Various packet handling cleanups.