Added support for sparsity in the console application.