add getBaseUri(), normalize port when default ports are used for HTTP and HTTPS, refactor Uri