Refactor 4.0.  All tests passing.