Code reorg for agent/pkt code