Refactoring sortability.