Inlined and refined path_optimal
Inlined path_opportunistic and other optimizations
Scope is nearing completion, merged into a single file