Minor revisions

Fixed some spelling and logic errors.