Refactoring code in TreeFacade.