Sorting almost done.
Sorting by category almost done.