Refactor towards v1-style API with tweaks
Fixup algorithms
Fix to setPath
Last bit of cleanup