diff --git a/scripts/zmap_update_web.sh b/scripts/zmap_update_web.sh
index 4e0fd965692c1f26dbe4172ec7ce26d522c5594f..5fae29ec346afbb670118eae62543219cb4265e3 100755
--- a/scripts/zmap_update_web.sh
+++ b/scripts/zmap_update_web.sh
@@ -57,6 +57,8 @@ if [ "x$ZMAP_MASTER_DOCS2WEB" == "x$ZMAP_TRUE" ]; then
 
     rm -rf $LOCAL_WEBSITE_TARGET/*
 
+    # Loop  through  the  directories  that contribute  to  the  site,
+    # copying them to a temporary local repository.
     for dir in $ZMAP_WEBSITE_SOURCE_DIRS; 
       do
 
@@ -108,6 +110,9 @@ if [ "x$ZMAP_MASTER_DOCS2WEB" == "x$ZMAP_TRUE" ]; then
       find $LOCAL_WEBSITE_TARGET -type f | xargs -r chmod 644
     done
 
+    # Loop through some individual files we need to copy, 
+    # but not whole directories, sticking them in the same 
+    # temporary directory
     for from_to in $ZMAP_WEBSITE_SINGLE_FILES;
       do
       
@@ -132,6 +137,7 @@ if [ "x$ZMAP_MASTER_DOCS2WEB" == "x$ZMAP_TRUE" ]; then
       find $LOCAL_WEBSITE_TARGET -type f | xargs -r chmod 644
     done
 
+    # Now that's done, get some release notes and expat documentation.
     
     update_release_notes_index=$ZMAP_TRUE
     if [ "x$update_release_notes_index" == "x$ZMAP_TRUE" ]; then
@@ -150,7 +156,7 @@ if [ "x$ZMAP_MASTER_DOCS2WEB" == "x$ZMAP_TRUE" ]; then
 	    zmap_message_out "Removing and recreating index.html [soft link]"
 	    rm -f $LOCAL_WEBSITE_TARGET/expat/index.html
 	    cp $LOCAL_WEBSITE_TARGET/expat/reference.html $LOCAL_WEBSITE_TARGET/expat/index.html
-	    cat >> $LOCAL_WEBSITE_TARGET/expat/index.shtml <<EXPAT
+	    cat > $LOCAL_WEBSITE_TARGET/expat/index.shtml <<EXPAT
 <!-- Auto generated by $0. Do not edit! -->
 <!--#include virtual="/perl/header"-->
 
@@ -176,6 +182,8 @@ EXPAT
     # Make all the header.ini files
     make_header_ini $LOCAL_WEBSITE_TARGET
 
+    # We've finished creating the local repository, so it can be copied to the website for serving on the server.
+
     zmap_message_out "Now copying the whole local webroot to $ZMAP_WEBSITE_TARGET"
     zmap_message_out "Running rsync -r $LOCAL_WEBSITE_TARGET/* $WEBUSER@$WEBHOST:$ZMAP_WEBSITE_TARGET/"