Add support for CJ queries

:-)
OK. I'll rewrite it as this, also for style consistency.