Refactoring the controller

Introducing more conventional structure of the controller, just in case
that the testing is not working because the previous set up