Remade the main window