Initial tweaks and refactoring.  Doesn't build.