Refactored Category and Subcategory selector