Merge "Refactor RankingMap building methods to reduce code duplication."