Simplify nnz statement, and the extraction of the non zero modes