STOCK AND WARRANT PURCHASE AGREEMENT