Have JSON.states() cache the result.
Add JSON.cmpStates()
Fix state change reporting logic.