Updated Index clean up script with CLI interface