Second step of refactoring.