Refactor cat/subcat