Refactoring zipper.py