Updated URI generation in accordance with RFC 3986.