Made CompareHeuristics a little more Scala-idiomatic.