XML documentation, some refactorring