Improve parse_network in utils