Change MainController to Singlton
Clean the Code