changed maincontroller

added the view and model to the constructor of the MainController
instead of having it added seperatly