Removed the unnecessary copy of `data` and storage into a Sample object. Now saves the stats in a dict that is picklable.