Added ability to reference functions
Merge branch 'bug/function-references'