move PATH UI code to path.js
make PATH UI helper func pointfree