Added new option 'persist_state'

See POD for details