cleans up tf-idf map