Added some documentation and changed the names of the XmlRoles to make
their usage clearer in the code.