Made the quadratic minimising code in a script to be run in FSI.