StyleCop cleanup, commenting and refactoring