Implemented snapshots
Rewritten to use dicts