Jaccard distances calculation

Checked. No evil side-effects. Good to go.