Refactored category entity relationship.