Added a new "parent" global function within template functions. Fixes #1.