Refactored everything for having categories