Initial commit of functions from github.com/btracey/optimize

Thanks. I forgot to change the strings. Fixed below too for the iterations.