First wave of refactoring