In this code, a 'leaf' view is always an external/terminal node (aka a module) and a 'tree' view is always a subcollection (or the entire collection).