Added datapacket structure and rewritten the peerdiscovery