Tweak the save/restore code to play slightly more nicely with the new script; remove comments that need to be manually maintained.