Removed all defines and replaced them with either enums or consts
Found 2 extra defines and a bug or two