Convert magic numbers to constants