Thanks for this, looks good. In future, it would be better if you could submit different PRs for different templates though.

The package-specific blocks of rules in the TeX template are currently in alphabetical order, so could you just move your additions to the right place instead of at the end of the template? Then we can merge.