Mostly cosmetic fixes identified through static analysis