cleaned up the xml parsing of these things