Create small functions in template.