Cleanup the JS a bit.