Removed all dead code from MainWindow.
Includes removing an if-statement that should've been dead but was erronously applied to the following statement. Dead code = bad, if-statements without braces = bad.
Merge pull request #799 from Susurrus/dead_code_rem

Removed all dead code from MainWindow.