Large amount of refactoring.