refactoring application class