Improved the tree slightly
Fixed bugs