Refined Diff algorithm for more clarity.