extract tree code to /libs/tree.js
Merge pull request #6 from blacktea1105/master

extract tree code to /libs/tree.js