The UI updates when the refresh button is pressed