Rewrite packet stuff again