Adding better code for network manager.