Updated the categories page, restructured the code a bit, updated the api for the categories CRUD operations