AMENDED AND RESTATED MASTER LOAN AGREEMENT Dated as of August 15, 1997 and amended and restated as of February 4, 2005