Made cSpawnPrepare execute on the same thread since it is a syncronous operation, and most of the code happens on the lighting thread. Also moved cSpawnPrepare into its own file