Add network, fix some networking issues