Refactored category API