typo fix and coding style improvements.