Clean up the logic in the __call() function.  Add pattern matching case to __call() function and fix categoriesminmax regex.