Refactor to use simpler method of change detection.