Implement tests for MObject/MObjects.

  - Full tests for MObject.
  - Also fixes some issues with leads tests.