Change magic numbers to constants