Some renaming and cleanup.
Renamed conn to buf to clarify that we expect a ReceiveBuffer.
Use to_hstring where possible.