Lots of streamlining

1. I really don't know MATLAB.
2. Again got solving of linear equations with MATLAB wrong.
3. Apparently, MATLAB doesn't solve linear equations by doing matrix inverse