Clean up and comment `restore_object`
Fixes to save_object
Fixes to save_object