diff --git a/web/save.cgi b/web/save.cgi
index 61dc1601d5639bbba52f9848fb21e1d85fbe7ff2..e91fa6f6bd63b2f4d3b9b239b74b6f24f6a228c5 100755
--- a/web/save.cgi
+++ b/web/save.cgi
@@ -135,6 +135,10 @@ if os.path.isfile(translatedfilename) or os.path.isfile(origfilename):
     cmd = "xsltproc xsl/bjcp-2015-styleguide-apply.xsl %s" % (snippetfilename)
     docmd(cmd)
 
+    log("reformatting %s/%s.xml" % (LANG, id))
+    cmd = 'xmllint --format %s/%s.xml | sed -e \'s/ standalone="yes"//\' > cache/tmp.xml ; cmp -s cache/tmp.xml %s/%s.xml ; if [ $? -ne 0 ] ; then cat cache/tmp.xml > %s/%s.xml ; fi ; rm cache/tmp.xml' % (LANG, id, LANG, id, LANG, id)
+    docmd(cmd)
+
     if doadd:
         log("adding new file %s/%s.xml to local repository" % (LANG, id))
         cmd = 'git add %s/%s.xml' % (LANG, id)
diff --git a/xsl/bjcp-2015-styleguide-apply.xsl b/xsl/bjcp-2015-styleguide-apply.xsl
index fb9f7fb3d8787463830cbf48af16d6b42b543499..e7598c3b4ab257c07f2d3aae6983dc223baf4009 100644
--- a/xsl/bjcp-2015-styleguide-apply.xsl
+++ b/xsl/bjcp-2015-styleguide-apply.xsl
@@ -36,17 +36,11 @@
 
   <xsl:variable name="snippetnode" select="/bjcp:styleguide//bjcp:*[@id = $snippetid]"/>
 
-<!--
-  <xsl:variable name="origroot" select="document('../bjcp-2015-styleguide-orig.xml')/bjcp:styleguide"/>
--->
   <xsl:variable name="origroot" select="document(concat('../orig/',$snippetid,'.xml'))/bjcp:styleguide"/>
 
   <xsl:variable name="orignode" select="$origroot//bjcp:*[@id = $snippetid]"/>
 
   <xsl:variable name="targetfilename">
-    <!--
-    <xsl:text>../</xsl:text>
-    -->
     <xsl:value-of select="$lang"/>
     <xsl:text>/</xsl:text>
     <xsl:value-of select="$snippetid"/>
@@ -116,12 +110,6 @@
 
 
   <xsl:template match="bjcp:name|bjcp:description|bjcp:overall-impression|bjcp:aroma|bjcp:appearance|bjcp:flavor|bjcp:mouthfeel|bjcp:comments|bjcp:history|bjcp:characteristic-ingredients|bjcp:style-comparison|bjcp:entry-instructions|bjcp:commercial-examples" mode="merge">
-<!--
-    <xsl:text>MERGING </xsl:text>
-    <xsl:value-of select="local-name(.)"/>
-    <xsl:text> MERGING
- </xsl:text>
--->
     <xsl:variable name="name">
       <xsl:value-of select="local-name(.)"/>
     </xsl:variable>