Switched to using an enum instead of string comparisons