Replaced fixed category types with more extensible category code