Replace 'params.pop(name)' with 'del params[name]'

More explicit; name is known to be in params
Remove some redudancy in _query