Clean-ups, comments, expand help information
Add DEBUG_OUT macro
Add a bunch of instrumentation using DEBUG_OUT
Fix naughty malloc bug & various robustness/error checking