Miscellaneous coding style and typo fixes