Using defined constants instead of numbers for state to text conversion