Finished refactoring.