Started giant refactoring.