Adding some functions to project, especially the line search function.