Finished the network layer, not yet tested.