Properly persist data source and sampler state
Some docs
Fixed issue remove entries from the state