Final clean up of the refactoring.