Replace magic numbers with enums.