Simplified the tree controller