Add IPathParser interface to reduce duplication.