some cleanup in tree