Overhauled the network handling code for post-modjam work.