Refined Difference to be immutable.

The Diff class was reworked to be more extensible and flexible.