Refactor category view

This commit doesn’t fix anything. In fact, the reject() should happen
if the category is not in the array.