Refactor tf-idf. Paste together vector space model parts