Refactored packet system.