Fixed a few spelling errors in code comments. Closes gh-849.