Small changes to get doit working.

Can now use doit to do multiprocessing.