Refactoring incoming packet routing
New state machine initialization