NOTE PURCHASE AND REPAYMENT AGREEMENT