cleanup the tree support a bit more
Merge pull request #174 from sonata-project/cleanups

cleaning up the tree handling a bit more