cleaning up index script