Refactor Collection#sortBy