Some minor improvements to our main window class [ci skip].
Some minor cleaning up [ci skip].