Reorganize SimilarityScorer code.