Refactor the type Cat to be stronger

I have found a few errors already that are due to insuficient analysis
of the category. This will hopefully avoid some of those errors.