Made packet handling not stupid