Data recovery 1862

For Sam to send to review.
This includes nine commits from Zack and one from me.