Fixing function ref namespace and making types work

Fixes the issue in which the templates and functions were not being
separated in the TOC