Started work on refactor of the controller class