Finished refactor.