Cleaning up JS a little.