Support for listening to state changes as described in issue #57