Exhibit 5.1 AMENDED AND RESTATED CREDIT AGREEMENT