DM returns shared pointer
Switched to chared pointers and macros