Initial work on the controller