Adding support for asynchronous save and load of states.