Implemented some more of the controller