JSDOM dependency upgrade and memory leak fix