Got the basics of category sorting done.