Removing CM value and clearing solve properly after matrix changes

Remove CM variable that is not necessary and clear solve when setting a
new matrix value