Adding parallelization

Adding the first bit of parallelization. This is a prototype, and still
needs some tweaking.