Beginning refactor.