mymemory/snapshot: rearrange snapshot implementation