Add PacketWriter and its implementation