Exhibit 2.40 AMENDED AND RESTATED MERGER AGREEMENT