Index: src/main/java/org/hippoecm/hst/demo/components/AbstractSearchComponent.java
===================================================================
--- src/main/java/org/hippoecm/hst/demo/components/AbstractSearchComponent.java	(revision 20123)
+++ src/main/java/org/hippoecm/hst/demo/components/AbstractSearchComponent.java	(working copy)
@@ -1,5 +1,21 @@
+/*
+ *  Copyright 2009 Hippo.
+ * 
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ * 
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
 package org.hippoecm.hst.demo.components;
 
+import org.apache.commons.lang.StringEscapeUtils;
 import org.hippoecm.hst.component.support.bean.BaseHstComponent;
 import org.hippoecm.hst.content.beans.query.HstQuery;
 import org.hippoecm.hst.content.beans.query.HstQueryManager;
@@ -67,7 +83,7 @@
                 Filter filter = hstQuery.createFilter();
                 filter.addContains(".", query);
                 hstQuery.setFilter(filter);
-                request.setAttribute("query", query);
+                request.setAttribute("query", StringEscapeUtils.escapeHtml(query));
             }
 
             final HstQueryResult result = hstQuery.execute();
Index: src/main/webapp/css/style.css
===================================================================
--- src/main/webapp/css/style.css	(revision 20123)
+++ src/main/webapp/css/style.css	(working copy)
@@ -147,6 +147,8 @@
 	*padding-right: 0.75em;
 }
 
+img.noborder {border:none;}
+
 a.back {
 	background: url(../images/goback.jpg) no-repeat;
 	/*padding-right: 123px;*/
@@ -202,3 +204,7 @@
   list-style-position:outside;
   list-style-type:circle;
 }
+
+div.right {
+    float:right;
+}
\ No newline at end of file
Index: src/main/webapp/jsp/components/header/header.jsp
===================================================================
--- src/main/webapp/jsp/components/header/header.jsp	(revision 20123)
+++ src/main/webapp/jsp/components/header/header.jsp	(working copy)
@@ -1,3 +1,17 @@
+<%--
+  Copyright 2008-2009 Hippo
+
+  Licensed under the Apache License, Version 2.0 (the  "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS"
+  BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. --%>
 <%@ page language="java" contentType="text/html; charset=UTF-8"
     pageEncoding="UTF-8"%>
 <%@ page trimDirectiveWhitespaces="true" %>
@@ -14,6 +28,6 @@
   <div id="nav">
     <ul class="menu">
       <li class="active">Tutorial</li>      
-      <li><a href="http://docs.onehippo.org/" title="News">Main documentation</a></li>
+      <li><a href="http://www.onehippo.org/" title="News">Main documentation</a></li>
     </ul>
   </div>
\ No newline at end of file
Index: src/main/webapp/jsp/components/layout/homelayout.jsp
===================================================================
--- src/main/webapp/jsp/components/layout/homelayout.jsp	(revision 20123)
+++ src/main/webapp/jsp/components/layout/homelayout.jsp	(working copy)
@@ -1,3 +1,17 @@
+<%--
+  Copyright 2008-2009 Hippo
+
+  Licensed under the Apache License, Version 2.0 (the  "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS"
+  BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. --%>
 <%@ page language="java" %>
 <%@ page trimDirectiveWhitespaces="true" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
@@ -13,7 +27,7 @@
         </div>
     </div>
   </div>
-  <div role="complementary" class="yui-b">
+  <div class="yui-b">
       Second Navigation
       (empty)
   </div>
Index: src/main/webapp/jsp/components/layout/threecolumnlayout.jsp
===================================================================
--- src/main/webapp/jsp/components/layout/threecolumnlayout.jsp	(revision 20123)
+++ src/main/webapp/jsp/components/layout/threecolumnlayout.jsp	(working copy)
@@ -1,3 +1,17 @@
+<%--
+  Copyright 2008-2009 Hippo
+
+  Licensed under the Apache License, Version 2.0 (the  "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS"
+  BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. --%>
 <%@ page language="java" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
Index: src/main/webapp/jsp/components/main/archive.jsp
===================================================================
--- src/main/webapp/jsp/components/main/archive.jsp	(revision 20123)
+++ src/main/webapp/jsp/components/main/archive.jsp	(working copy)
@@ -24,13 +24,16 @@
 <c:set var="prevpage" value="${searchResults.previous}"/>
 <c:set var="firstpage" value="${searchResults.startPage}"/>
 <c:set var="lastpage" value="${searchResults.endPage}"/>
+
+<hst:head-contribution keyHint="title"><title>Archive</title></hst:head-contribution>
+
 <div id="yui-u">
         <h1>Archive</h1>
         <h2>Displaying ${searchResults.startOffset +1} - ${searchResults.endOffset} of ${searchResults.total} results</h2>
         
         <c:forEach var="bean" items="${searchResults.items}" varStatus="indexer">
+          <ul class="list-overview">
             <hst:link var="link" hippobean="${bean.item}"/>                         
-        <ul class="list-overview">
             <li class="title">
                 <a href="${link}">${bean.title}</a>
                 <div>
@@ -38,11 +41,10 @@
                     <p>${bean.text}</p>
                 </div>
             </li>
-            
-            </li>
-        </ul>
+          </ul>
         </c:forEach>
-        <ul id="paging-nav">
+        <c:if test="${not empty searchResults.pageNumbersArray}">
+	        <ul id="paging-nav">
             <c:forEach var="pageNr" items="${searchResults.pageNumbersArray}" varStatus="status">
                 <c:set var="active" value="" />
                 <c:if test="${searchResults.currentPage == pageNr}">
@@ -54,6 +56,7 @@
                 </hst:renderURL>
                 <li${active}><a href="${pagelink}" title="${pageNr}">${pageNr}</a></li>
             </c:forEach>
-        </ul>
+	        </ul>
+        </c:if>
     
 </div>
Index: src/main/webapp/jsp/components/main/detailpage.jsp
===================================================================
--- src/main/webapp/jsp/components/main/detailpage.jsp	(revision 20123)
+++ src/main/webapp/jsp/components/main/detailpage.jsp	(working copy)
@@ -1,5 +1,5 @@
 <%--
-  Copyright 2008 Hippo
+  Copyright 2008-2009 Hippo
 
   Licensed under the Apache License, Version 2.0 (the  "License");
   you may not use this file except in compliance with the License.
@@ -26,7 +26,6 @@
 <hst:element var="yuiLoader" name="script">
   <hst:attribute name="id" value="yuiloader" />
   <hst:attribute name="type" value="text/javascript" />
-  <hst:attribute name="language" value="javascript" />
   <hst:attribute name="src" value="${yuiLoaderSrc}" />
 </hst:element>
 <hst:head-contribution keyHint="yuiLoader" element="${yuiLoader}" />
@@ -34,15 +33,16 @@
 <hst:element var="inlineEditing" name="script">
   <hst:attribute name="id" value="inlineEditing" />
   <hst:attribute name="type" value="text/javascript" />
-  <hst:attribute name="language" value="javascript" />
   <hst:attribute name="src" value="${inlineEditingSrc}" />
 </hst:element>
 <hst:head-contribution keyHint="inlineEditing" element="${inlineEditing}" />
 
+<hst:head-contribution keyHint="title"><title>${document.title}</title></hst:head-contribution>
+
 <c:if test="${not empty goBackLink}">
-<div align="right">
+<div class="right">
   <a href="<hst:link path="${goBackLink}"/>">
-    <img src="<hst:link path="/images/goback.jpg"/>" border="0"/>
+    <img src="<hst:link path="/images/goback.jpg"/>" class="noborder" alt="Go back"/>
   </a>
 </div>
 </c:if>
@@ -60,16 +60,16 @@
             </c:otherwise>
         </c:choose>
     </p>
-    <p>
+    
         <c:choose>
             <c:when test="${isPreview}">
-                <span class="editable inline" id="demosite:body"><hst:html hippohtml="${document.html}"/></span>
+                <div class="editable inline" id="demosite:body"><hst:html hippohtml="${document.html}"/></div>
             </c:when>
             <c:otherwise>
                 <hst:html hippohtml="${document.html}"/>
             </c:otherwise>
         </c:choose>
-    </p>
+    
   </div>
   
   <c:if test="${not empty document.image}">
@@ -92,7 +92,7 @@
   </div>
   
   <div>
-    <form method="POST" action="${addURL}">
+    <form method="post" action="${addURL}">
       <h4>Enter your comment here:</h4>
       <table>
         <tr>
@@ -132,7 +132,7 @@
   </div>
 </form>
 
-<script type="text/javascript" language="javascript">
+<script type="text/javascript">
 //Instantiate and configure Loader:
 var loader = new YAHOO.util.YUILoader({
 
Index: src/main/webapp/jsp/components/main/home.jsp
===================================================================
--- src/main/webapp/jsp/components/main/home.jsp	(revision 20123)
+++ src/main/webapp/jsp/components/main/home.jsp	(working copy)
@@ -1,14 +1,29 @@
+<%--
+  Copyright 2008-2009 Hippo
+
+  Licensed under the Apache License, Version 2.0 (the  "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS"
+  BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. --%>
 <%@ page contentType="text/html; charset=UTF-8" language="java"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
 <%@ taglib uri="http://www.hippoecm.org/jsp/hst/core" prefix='hst'%>
 
+<hst:head-contribution keyHint="title"><title>${document.title}</title></hst:head-contribution>
 
-<div role="main" class="yui-u">
+<div class="yui-u">
   <h1>${document.title}</h1>
   <p>${document.summary}</p>
-  <p><hst:html hippohtml="${document.html}"/></p>
+  <hst:html hippohtml="${document.html}"/>
 
   <p> </p>
   
Index: src/main/webapp/jsp/components/main/leftmenu.jsp
===================================================================
--- src/main/webapp/jsp/components/main/leftmenu.jsp	(revision 20123)
+++ src/main/webapp/jsp/components/main/leftmenu.jsp	(working copy)
@@ -1,5 +1,5 @@
 <%--
-  Copyright 2008 Hippo
+  Copyright 2008-2009 Hippo
 
   Licensed under the Apache License, Version 2.0 (the  "License");
   you may not use this file except in compliance with the License.
@@ -33,7 +33,7 @@
               </a>
           </c:otherwise>
       </c:choose>
-      <c:if test="${item.expanded}">
+      <c:if test="${item.expanded and not empty item.childMenuItems}">
       <ul>
           <c:forEach var="subitem" items="${item.childMenuItems}">
               <li>
@@ -48,7 +48,7 @@
                   </a>
               </c:otherwise>
               </c:choose>
-                  <c:if test="${subitem.expanded}">
+                  <c:if test="${subitem.expanded and not empty subitem.childMenuItems}">
                       <ul>
                       <c:forEach var="subsubitem" items="${subitem.childMenuItems}">
                           <li>
@@ -63,7 +63,7 @@
                               </a>
                           </c:otherwise>
                           </c:choose>
-                          <c:if test="${subitem.expanded}">
+                          <c:if test="${subitem.expanded and not empty subsubitem.childMenuItems}">
                           <ul>
                               <c:forEach var="subsubsubitem" items="${subsubitem.childMenuItems}">
                                   <c:choose >
@@ -83,8 +83,8 @@
                                   </c:choose>
                               </c:forEach>
                           </ul>
-                          </li>
-                      </c:if>
+                        </c:if>
+                       </li>
                       </c:forEach>
                       </ul>
                   </c:if>
Index: src/main/webapp/jsp/components/main/todolist.jsp
===================================================================
--- src/main/webapp/jsp/components/main/todolist.jsp	(revision 20123)
+++ src/main/webapp/jsp/components/main/todolist.jsp	(working copy)
@@ -1,3 +1,17 @@
+<%--
+  Copyright 2008-2009 Hippo
+
+  Licensed under the Apache License, Version 2.0 (the  "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS"
+  BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License. --%>
 <%@ page contentType="text/html; charset=UTF-8" language="java"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>
@@ -17,12 +31,14 @@
           <div>
             <c:choose>
               <c:when test="${item.type == 'publish'}">
-                <form method="POST" action="${documentActionUrl}">
-                  Your action:
-                  <input type="hidden" name="requestPath" value="${item.path}" />
-                  <input type="hidden" name="requestType" value="${item.type}" />
-                  <input type="submit" name="documentAction" value="Accept" />
-                  <input type="submit" name="documentAction" value="Reject" />
+                <form method="post" action="${documentActionUrl}">
+                  <div>
+	                  Your action:
+	                  <input type="hidden" name="requestPath" value="${item.path}" />
+	                  <input type="hidden" name="requestType" value="${item.type}" />
+	                  <input type="submit" name="documentAction" value="Accept" />
+	                  <input type="submit" name="documentAction" value="Reject" />
+                  </div>
                 </form>
               </c:when>
             </c:choose>
@@ -32,6 +48,6 @@
     </ul>
   </c:when>
   <c:otherwise>
-    <I>There's no item now.</I>
+    <i>There's no item now.</i>
   </c:otherwise>
 </c:choose>
\ No newline at end of file
Index: src/main/webapp/jsp/templates/rss.jsp
===================================================================
--- src/main/webapp/jsp/templates/rss.jsp	(revision 20123)
+++ src/main/webapp/jsp/templates/rss.jsp	(working copy)
@@ -1,5 +1,5 @@
 <%--
-  Copyright 2008 Hippo
+  Copyright 2008-2009 Hippo
 
   Licensed under the Apache License, Version 2.0 (the  "License");
   you may not use this file except in compliance with the License.
@@ -16,6 +16,9 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
 <%@ taglib uri="http://www.hippoecm.org/jsp/hst/core" prefix='hst'%>
 <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+
+<fmt:setLocale value="en-US"/>
+
 <hst:link var="feedlink" path="/rss.xml"/>
 <rss version="2.0">
    <channel>
Index: src/main/webapp/jsp/templates/webpage.jsp
===================================================================
--- src/main/webapp/jsp/templates/webpage.jsp	(revision 20123)
+++ src/main/webapp/jsp/templates/webpage.jsp	(working copy)
@@ -1,5 +1,6 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 <%--
-  Copyright 2008 Hippo
+  Copyright 2008-2009 Hippo
 
   Licensed under the Apache License, Version 2.0 (the  "License");
   you may not use this file except in compliance with the License.
@@ -19,22 +20,21 @@
 <%@ taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x" %>
 <%@ taglib uri="http://www.hippoecm.org/jsp/hst/core" prefix='hst'%>
 
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
+<html  xmlns="http://www.w3.org/1999/xhtml">
   <head>
     <hst:head-contributions />
-    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
-    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css">
-    <link rel="stylesheet" href="<hst:link path="/css/style.css"/>" type="text/css">
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
+    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.7.0/build/reset-fonts-grids/reset-fonts-grids.css"/>
+    <link rel="stylesheet" href="<hst:link path="/css/style.css"/>" type="text/css"/>
   </head>
   <body>
       <div id="custom-doc" class="yui-t6">
-        <div id="hd" role="banner">
+        <div id="hd">
         <hst:include ref="header"/>
       </div>
           <hst:include ref="body"/>
           <div id="ft">
-        <p><a title="NewsRSS" href="<hst:link path="/rss.xml"/>">RSS <img src="<hst:link path="/images/rss.gif"/>"/></a></p>
+        <p><a title="NewsRSS" href="<hst:link path="/rss.xml"/>">RSS <img src="<hst:link path="/images/rss.gif"/>" alt="RSS icon"/></a></p>
       </div>
       </div>
   </body>
