Working on Nelder Mead code and docu