Cleanup app and mainwindow

souns good, fixed.