Refactor: extracted methods for path lookup into new trait.