Setting up main window