Update MainController.cs

Minor improvements and new issues