Made the constructor easier in MainView