free_network_id no longer throws an exception
Also, added some comments to the unit test for this function.