Added a save functionality, pressing space key