Couple tiny performance improvements and a new param to getQueryParams()