Completing minor fixes to #53. Should be ready to go. Further mods should be marked as bugs or enhancements.
Completes enhancement #93.
cleans up some existing code crap. No functionality changes.