Checking touch events slightly more efficiently, I think.  And fixed the error on closing the app.