Working snapshot.
Add comments.
Add setup_hash and hashnext.
Fix typo.
Add comments.