Set up the undoing system in session.py