Remove outdated code.
Add main window code.