mainWindow constructor verbetering.