code cleanup in class TestbedPacketFactory
further cleanup in TestbedPacketDispatcher