Reporting: return the correct hostname w/o a port.

Add comments to clarify what's going on.