Fixed and optimized TF-IDF