Minor cleanup of UI and JavaScript