Simple DOM-driven template engine