applied some resharper suggestions with variable naming and LINQ to XML handling to avoid potential exceptions