templating engine prototype, template fixes