refactor JS and UI
refactor UI and js