75% threshold seems to be closer to 1-way/2-way split.
Read road network from named file instead of hardwiring
Fix the snapping problem with dual carriageways:

Prefer to snap to a way that's going the correct direction, even if the
one going the other direction is closer.