started refactoring
more refactoring
more refactoring3
more refactoring 4
more refactoring5
window show/hide depending on settings
window correctly switches on/off