Improve the templating engine