Change magic numbers into constants