Refactor cApp::Run()