Improved exit code.  Clears resources, but still requires a few backs.
Code cleanup.