Merge "Typo fixes in comments and minor code cleanups." into gingerbread