Worth adding comments on these lines to explain what the encoded values are? The “query & stuff” one is reasonably obvious, given the parameter above, but the square-bracket encoding is less obvious.