Updated for refactoring.