Commit MainPage class