Feature/190 proper dml

Fixes #190.