New path nesting API, closes #3