Fix url query issues

Refactored the UrlBuilder service to handle standard URL query parameters and perform URI encoding of query parameters.