Fix most of the HLint warnings