Fix url encoding
Fix query index
Trying Fix 400
Improve test suite