More work on datastores.

Change-Id: I7c8ef1c7e33a9e3434e70f90dcf9ead2a6c0cbad