clean up index directives