Slight refactor to separate calculating and displaying the similarity matrix