Replace magic numbers with constants.