Exhibit 10.4 AMENDED AND RESTATED MASTER AGREEMENT Dated as of June 26, 2003