dtoh, first draft

I have this basically working and want to get it out so other people can take a look. Should be usable for a decent amount of stuff already.