Refresh functionality added

Added functionality to the refresh buttons.