Changed the magic numbers to more descriptive defines