Code documentation

Add XML comments and fix StyleCop warning.