initial cleanup of indexes and links files