refactored product and category models and relationship to make more DRY