Initializing main window