Path conversion function

Refactoring: Moved path conversion into a function