Cleanup app and mainwindow

A similar comment to the reorder imports applies to this line.