Changed to use net/url.URL.
Changed url construction to use net/url.