Exhibit D AMENDED AND RESTATED SECURITY AGREEMENT