Added network discovery code.