First part of refactoring.