Reworked the sorting example.