Initial version of snapshot file
Pull generic functions out
Make snapshot code into a class (SnapshotService)
Add documentation