Cleanup the way the templates are fetched