Lots of refactoring of parallel stuff.