Simplify and clean up packet encoders