Applied a HLint pass

Applied HLint to all source code files to improve code quality