Created main controller class.