SnapshotName field added to save sanpshot after checkpoint + smalll refactring.