EXHIBIT D STOCK PURCHASE AND LOAN OPTION AGREEMENT INVESTOR RIGHTS AND STOCKHOLDER AGREEMENT