Cleaned up some code and updated the code so that it parses all the xml files that are in a directory