Use 'state::changed' instead of hardcoded calls to refresh (issue #18)