Fix the build + 2 minor fixes

That should have been removed. Will push fixed commits in a few minutes. The problem here is, that the MainWindow.cpp seems to be from a completely different version of the codebase (one with MainTBar sources).