refactored application class