Added a packet handling system