Cleanup.  Fixes #5, fixes #6, fixes #7