MainPage and general fixes