Clean up query string