Feature/specs/spec catchup

Adds a few bug fixes and a lot of specs to Mdm
Also migrates a lot of factories into Mdm where they belong