Fixed potential problem with matching custom functions in templates, now custom functions must return rather than echo/print a value, updated tests and README