Refactor navmesh loading