Minor improvements and added XML documentation.