Made a new packet parser and added comments!

The new PackeParser is a statemachine and works much more cleanly than
either of the old ones.