Refactor magic numbers to int constants