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

Fix punctuation at end of line.