Improve tree handling behavior; drawbacks and fixes
Update tests