Refactor to remove duplication in discrepancy methods

Also hook up to metasane script