Refactoring - clean up XMLParser