refactored application-handlers into one place