Refactored code so it uses exact_category_id again.