Fix and test .mlt() and some code cleanup.
Implements the diff method.