implement negotiation request creation, refactor pktline

create the negotiation for refs from the server,
shorten some functions after learning of Str::concat