Added categories sorting (sort of)