Refactor SnapshotService.