Sorting categories correctly for home screen display