Dont use 2 QTMainWindows
Lots of small fixes
some pep8 tidying