Changed forgotten magic numbers to named constants.