Move context menu management to main window
Fix transform command (remove input formats after success)
Refactor main window options and tray initialization
Focus windows explicitly only if necessary
MainWindow clean up