Refactor. Only pass a single config in queryStr.