Start of XMLReader and refactoring