Similarity Matrix Class

Refactored matrixToCSV into a single function