Updates to state machine.