Regressions

Mostly fixes for regressions that occurred during refactoring.  Some minor code cleanup or enhancements.