Hierarchy and cleanup