Cleaned up JS a little.