Refactored and complete.