Added support for state machine persistence.