Refactoring around GetLatestSnapshotId