More JS cleanups