Inlining `init_putcore` makes sense, but I think we should keep `apply_updates` as a separate function to keep the code clean. Just change `apply_updates` to do the above `RObj1, RObj` logic and return the final `RObj` that you'll end up storing in `StateData`.