Refactor path-bridleway code