Adding the main window