Move diff logic into Diff.scala