Initial work on persistence api.