Changed how enums are referenced

Made a func to get the int value from an enum