Implement tests for MObject/MObjects.

- Also fixes some issues with leads tests.
Preparing for initial release.