Slight refactor to make the debug gui own the entire process...