cleaned up xmlreader