Update MainController.java

did some changes.