More changes for using pickle