Templatehelpers function

Addresses issue #16.