Feature #65, refactored controllers, middlewares and services