Rip out old terrible sorting magic