Red Sox-Dodgers deal nearly done