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

Put the errors in a block or related blocks.