Unit tests for networking

Doing unit tests for networking. Should prevent stupid bugs between encode/decode.
Nothing says "done" like a TODO in the first line of the diff