refactoring in "tree-parser" module