Merge refresh and refresh_window methods