Update generated equations and add text file with a numeric cost function
A few optimizations to Polynomial