Partial revert of 4d2c4af 'Improve template mechanism'
Partial revert of 4d2c4af 'Improve template mechanism'

There were template functions which we defined and others started using.
Although we no longer want those functions, since others use them,
deleting them breaks our API.  Putting those (unused) functions back.

eparis/cobra