Refactor categories controller to use AppCtrl