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

Use blank lines to separate fields.