Give the state engine a explanatory enum, rather than magic values
of 0, 1 and 2.