slightly reorganized main window