Refactor +refresh_available_dates+