Complete rewrite of c3po for multicore