Tree refactor, new hierarchy style