Hooked up JSON patch for state changes