Replace string comparisons with enums.