Updated selector.js, tree.js