clean up & support for hierarchical modules