Implemented tree.js