fixes in tree, still to be done in treemap