Refactor to shorten code in categories controller
Change header for clarity