first wave of refactoring