Update categorizr.php

Refactoring of comparing functions.