Improve persist and commit model