Added code to completely close the app.