Back to URL construction function, now part of connect function