More JS cleanup, finishing B2