improvements to UI and JS code