Updating rewrite.py.