Implemented better XML Parsing