Added comments. Refactoring based on resharper