Reduced the amount of magic numbers in the code