Data Refresh, Refactored code

Data Refresh, Refactored code