Revert "Rank sort"

This reverts commit 6c9d1243cb3f591ccc8a7ce367a9c5c212d3e9ba.