Cleaning up replay.py