Updated code to work with new XML naming scheme