Note, state and extXX (extended state variables) are only used by the state machine and are initialized on create. Doing this here is confusing.