Tiny performance improvement and a new param to getQueryParams()