This is hard to read... maybe it should be indented as XML.