Inclusion of #60 and additional template refactors

Hey @brentonashworth, can I get your final sign-off on #60 and some related refactors of `dtfn` I've made?

I've pulled out a bunch of the processing in `dtfn` into more grokable helper functions. Additionally I've added a decent test suite that stresses `dtfn` end-to-end. I've confirmed todo-mvc and the chat-client both function as expected. Would you be able to do a check on hammock cafe -- I'm not sure where that lives now and what your process is there now-a-days.