added working pause and exit-game functionality.