Refactor request_controller and some other stuff