A bunch of untested refactoring.