Replace magic values with constants.