Refactor category and tag to add public attribute