Full refactoring.