implements initial custom-index cleanup.