Making auto useful
Added nelder mead minimization code