Refactor and clean
Make MainWindow::closeEvent() protected