added app class singleton and refactored response and router