Clean up some process spawning code.