Added code to make zones track their state changes.