Refactoring of the controller's API