Persistence improvements.

Change-Id: I7156ae27b7407c67a5d37cf94a0f2d91cb4c50a7