Refactored application so that the requestHandlers can response directly