Remove unused imports. Fix beeing able to instanciate multiple windows. Enabled proper open-hide behaviour of main window.