Persistence deux

This is updated to track as many of @m21's changes as are in github at this point.

I have done basic testing on the latest merge and more extensive testing on the merge prior to it.