Refactored
Fixed header
Incorrect (seen by running regress_weird3 without upper solver)
Cleaned code
Fixes for Octave
Refactored