Update to Javascript through debugging

Moving some things around to help flow.