Moved locals from main into an App class.