Refactor path builder