Refractor packets into a single class.