Refactoring, 1st pass.