Refactor PATH setup