clean up JS a little