some beginnings of decoupling HTML
custom formulae added, templateX added, dom() macro added