Added main method to MainController