Reorganized exported module entities, done some minor refactoring. The test now generates a tree with sthing like 2,3 mln nodes.