This fixes a couple errors that were previously not logged as well as ensuring most templates are appropriately parsed via tests.
This adds several functions which are available in most areas that use templates.