Updated JS quite a bit