Refactor scores_helper.