Added comments, fixed StyleCop violations.