Fixed some of the HLint warnings