Update JS for readability improvements