Move the mime check and the ErrorWin out of the MainWin

This in preparation of more file splits
Move all the gui class inside a proper gui.py file