Fairly sweeping but mechanical changes to the "*State" objects.
Each one now has an internal State object that captures the values
rather than returning them lazily from the underlying JSON structure.
This provides a simple state object that just captures the underlying
data which is useful to pass around at higher levels.

Added a couple of other utility methods as well.