Updates to pandoc template processing