Refactoring the pickler