Improve the controller structure