Minor changes to sparse matrix and matrix print