fix getty spawning and code cleanup