Fix diff report properly

Now the buckets are indexed by indexes, not #-# any more, and only format in the print function as it should be.

Several doctest are added to ensure the consistent output.