Some code I swiped from a web page that shuts down the app....