Updated source code to remove some StyleCop warnings