Add retrieval of previous snapshot and comparison to candidate.
Fix crash bugs in interface to read latest snapshot.
Fix logic inversion.