Separate tree.js in two files