I think the recursion was built into a previous version where I recursed the topic tree, then realized it was all easier with NODE_CACHE.  I'll update accordingly.  I think one function should be enough!