Refactored some of the tcpdump code