Tweaks to mostSimilarMatrix