Improve Stop/Pause functions and closeEvent
Some minor changes