Added support for snapshots, fixed exceptions.