refactored global alert pop up, refresh control, etc.