Refactoring matrix_expand
ConstMX::getSetNonZeros simplification