restructure js
modify namespace