Finish implementing and vaugely testing the mindwave parsing code.

It's dirty and not yet finished but it works!