JUNIOR SECURED NOTE PURCHASE AGREEMENT