Similarity features

Adjusted cosine implementation and tests.
Also gitignore updated