Refactoring the Request Handlers and structure of the application.