comprehensive changes to get the network stack working