Clean up index generation.