Rewrite build_url, use web_protocol for repo indicator. Explicitly initialize custom port to make the logic obvious.
Also remove now-unused tab_class helper