more cleanup, and fixed the 'bug' that caused the application to stop on screen rotation.