Breaking change: add templating, change function options