Switched to QMainWindow, plus some other improvements.