Added category sorting