Remove defunt code from JS lib