Create treemanager.js