Fixed comparators for Categories and Entities

* Specs are still failing, something is broken in
  the JSON parser