More MainWindow editor code refactoring