MainWindow fixes and documentation.