don't expose 3 different diff foreach methods. use structures instead of pointers to structures for diff detail. expose Deltas as slices instead of methods. add patch error code handling. trim excess data from diff structures.