Switch to using enum as opposed to string comparison