fixed some bugs. cleaned tf-idf