Started refactor.