Start of FailedSnap history analysis code. Doesn't really produce reasonable results.