Finished first phase of refactoring.  Will return when current work is
finished.