Major refactor or spawn.py.