fixed error in simplex minimizer
node now keeps track of basis model
added project_distance and apply_model to node class
made apply_model more general