Updated MainController for the Controller Class.