clean up hierarchy