Added sparse versions and plotting.