Fixes for function and additions to graph templates

:+1: thanks!