Fix broken test
Register functions on tag
Rewrite to handle custom functions on tags