Redid the network functions to use only ipaddr