Fix bug in cosine similarity, add a 6th feature to feature generation.