isolate dmd from dt internals

Now it's a function only interface.