Changed varNum in first line of output of create_cost_function to numVar
Bugfix: last variable was invented when the cost function was created.
Merge branch 'changesToCreateCostFunction'