Modified error in removing category

CatA and CatB are sets, because it is much much faster to remove
elements from them than from lists.