More refactoring
More refactoring

Starting to get not-too-bad.  Probably good enough for the time being.