improved documentation in Packet and PacketFactory, and fixed some minor formatting and convention issues