Start of refactor.