Optimize old linesearchunconstrained

- few modifications to clarify code