Fix xml glitches, some editorial improvements