Implementation of the Diff class.