New web UI: JS cleanups