Add template polynomials

This is a follow-up of #1. Only template polynomials are currently added.