Refactoring: just structural cleanup for readability

No changes to features yet.  Inspired by Bill's work, I browsed his updates and did some commenting & spring cleaning.  Hopefully this makes things more clear for others as well.