Reformated Controller class