update all CApp::factory to CApp::instance