Remove tree from js