refactoring: moved menu into MainWindow class