explaining xsl better and adding some post-xsl perl cleanup