sent friendrequest multiple times in case of packet loss

and some tidying, fixed my errors