Now writes out all the YY elements.