Best effort to have consistent and fool-proof includes.  Misc. other fixes/changes.
removed debugging echo statements