Variety of minor fixes so that using the GA algorithm works in the optimizerinterface example code.

Let me know if you want me to break these up into multiple pull requests, particularly since EOL whitespace changes got interleaved.  Also let me know if you have other feedback on the pull request.  Thanks!