MDModel implementation.
TODO: Store implementation and bits and pieces. Also: testing.