fixed bug with connection numbering
started fleshing out the json decoding of messages from the network layer