Use SPARSE matrices. Add tests.