Refactoring `data.batch()` to be aware of `data.leafs[]`, updated `data.generate()` to use the appropriate record key (instead of concatenating the parent.id)