Clean up JS a bit