Removed leafs code.
separated trees.js