Completed refactor.