- Refactor to facilitate state cloning and hence parallelization.

