Changing packet system to be easier to apply and fixing some errors