Cleaned up `reverse.py`.