only auto-expand if expand-level attr is passed (allows manual expanding)
Branch is a leaf if it has no children; don't autocreate empty children on nodes