Finalized CategoryType ranking algorithm