[refactoring] Removed hundreds of unrelated lines from XML loader.