Added advanced Primo query parsing.