Rework UI update logic