Refactored throughout.