Refactored for quality.