Changed all preprocessor defines to be enums
Changed references to constants to use enums