cleanHierarchy