Minor changes, avoid recursive approach in readPacket()
Remove the buffer copying, no longer necessary