Added some documentation and the controller class