Introduce a #_normalizeQueryParams() function for DRY