Extracted path building logic into wayfinding.datastore