CLI improvements and main window