Scrutinizer first inspection CS fixes

These are the first round of code style changes suggested by Scrutinizer.