Minor improvements to tf_idf and preprocessing.