Minor refactoring of PowerSort.