Refactored magic numbers to named constants.