Cleaned up back and added a restore

this is an intermediate untested rough draft commit.
it probably doesn't work.