comment cleanup and making sparsity optional