Handle flattened regulation tree
typ -> node_type
Fix missed tests
Merge pull request #5 from cmc333333/master

Account for flatter node structure