refactoring

added MainAppController