[DDMD] [refactor] Move remaining toDt methods into free functions

And improve some of the names.