review round 1
- move NetworkUtils change, do it in separate change
- simplify set checks
- didn't refactor to a common class, It think the logic is small enough to not warrant it for now