AutoUpdateStyleListener refactor and optimization.