Some small optimizations

This change makes two small adjustments:

The check for the length of the query string is performed without explicitly checking the length. Since any string of non-zero length is boolean true, there's no need for the length check.

Secondly, the `$.each` call has been replaced with a similar `$.map` call. Using `$.map`, the actual value operated on is passed first, removing the need to catch an unused `i` parameter.