Index: trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLButton.java
===================================================================
--- trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLButton.java	(revision 1264)
+++ trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLButton.java	(revision 1276)
@@ -19,5 +19,5 @@
 /**
  * <p>
- * TODO comment
+ * 
  * </p>
  * 
Index: trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocument.java
===================================================================
--- trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocument.java	(revision 1264)
+++ trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocument.java	(revision 1276)
@@ -19,5 +19,8 @@
 /**
  * <p>
- * TODO comment
+ * a GUI element representing an HTML document, i.e., a page on an HTML server. This is the
+ * element for a GUI model of an HTML web site being always and only the children of servers. It
+ * is identified through the server on which it resists, its path, a potential query, and a title.
+ * Its children are HTML page elements
  * </p>
  * 
@@ -26,14 +29,18 @@
 public class HTMLDocument extends HTMLGUIElement implements IDialog {
 
-    /**  */
+    /**
+     * <p>
+     * default serial version UID
+     * </p> 
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * instantiates the document with it specification and its parent, which is always a server
      * </p>
      *
-     * @param specification
-     * @param parent
+     * @param specification the specification of the document
+     * @param parent        the server on which the document resists
      */
     public HTMLDocument(HTMLDocumentSpec specification, HTMLServer parent) {
@@ -43,8 +50,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the path in the URL of the document
      * </p>
      *
-     * @return
+     * @return the path in the URL of the document
      */
     public String getPath() {
@@ -64,19 +71,19 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the server on which the document resists
      * </p>
      *
-     * @return
+     * @return the server on which the document resists
      */
-    HTMLServerSpec getServer() {
-        return ((HTMLDocumentSpec) super.getSpecification()).getServer();
+    HTMLServer getServer() {
+        return (HTMLServer) super.getParent();
     }
 
     /**
      * <p>
-     * TODO: comment
+     * returns the title of the document
      * </p>
      *
-     * @return
+     * @return the title of the document
      */
     String getTitle() {
Index: trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocumentSpec.java
===================================================================
--- trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocumentSpec.java	(revision 1264)
+++ trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLDocumentSpec.java	(revision 1276)
@@ -19,5 +19,8 @@
 /**
  * <p>
- * TODO comment
+ * a GUI element specification of an HTML document, i.e., a page on an HTML server. This is the
+ * element for a GUI model of an HTML web site being always and only the children of servers. It
+ * is identified through the server on which it resists, its path, a potential query, and a title.
+ * Its children are HTML page elements
  * </p>
  * 
@@ -26,27 +29,50 @@
 public class HTMLDocumentSpec extends HTMLGUIElementSpec implements IGUIElementSpec {
 
-    /**  */
+    /**
+     * <p>
+     * default serial version UID
+     * </p> 
+     */
     private static final long serialVersionUID = 1L;
     
-    /** */
+    /**
+     * <p>
+     * the server on which the document resists
+     * </p>
+     */
     private HTMLServerSpec server;
     
-    /** */
+    /**
+     * <p>
+     * the path in the URL of the document
+     * </p>
+     */
     private String path;
     
-    /** */
+    /**
+     * <p>
+     * the query in the URL of the document
+     * </p>
+     */
     private String query;
     
-    /** */
+    /**
+     * <p>
+     * the title of the document
+     * </p>
+     */
     private String title;
     
     /**
      * <p>
-     * TODO: comment
+     * initializes the document with its server, path, query, and title
      * </p>
      *
-     * @param server
-     * @param pagePath
-     * @param pageTitle
+     * @param server the server on which the document resists
+     * @param path   the path in the URL of the document
+     * @param query  the query in the URL of the document
+     * @param title  the title of the document
+     * 
+     * @throws IllegalArgumentException if the server or path are invalid, i.e. null
      */
     public HTMLDocumentSpec(HTMLServerSpec server, String path, String query, String title) {
@@ -104,8 +130,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the server on which the document resists
      * </p>
      *
-     * @return
+     * @return the server on which the document resists
      */
     public HTMLServerSpec getServer() {
@@ -115,8 +141,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the path in the URL of the document
      * </p>
      *
-     * @return
+     * @return the path in the URL of the document
      */
     String getPath() {
@@ -126,8 +152,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the query in the URL of the document
      * </p>
      *
-     * @return
+     * @return the query in the URL of the document
      */
     String getQuery() {
@@ -137,8 +163,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the title of the document
      * </p>
      *
-     * @return
+     * @return the title of the document
      */
     String getTitle() {
Index: trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLGUIElementSpec.java
===================================================================
--- trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLGUIElementSpec.java	(revision 1264)
+++ trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLGUIElementSpec.java	(revision 1276)
@@ -19,5 +19,5 @@
 /**
  * <p>
- * TODO comment
+ * base class for all GUI element specifications in the context of HTML
  * </p>
  * 
@@ -26,18 +26,27 @@
 public class HTMLGUIElementSpec implements IGUIElementSpec {
 
-    /**  */
+    /**
+     * <p>
+     * default serial version UID
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
     
-    /** */
+    /**
+     * <p>
+     * the type of GUI element represented by this specification, which is usually the tag name of
+     * the HTML GUI element
+     * </p>
+     */
     private String type;
     
     /**
      * <p>
-     * TODO: comment
+     * instantiated the specification with the type, i.e., tag name of the represented GUI element
      * </p>
      *
-     * @param type
-     * @param index
-     * @param id
+     * @param type  the type, i.e., tag name of the represented GUI element
+     * 
+     * @throws IllegalArgumentException if the provided type is null
      */
     public HTMLGUIElementSpec(String type) {
@@ -70,8 +79,6 @@
     }
 
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
+    /* (non-Javadoc)
+     * @see de.ugoe.cs.autoquest.eventcore.guimodel.IGUIElementSpec#getTypeHierarchy()
      */
     @Override
Index: trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElement.java
===================================================================
--- trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElement.java	(revision 1264)
+++ trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElement.java	(revision 1276)
@@ -17,5 +17,7 @@
 /**
  * <p>
- * TODO comment
+ * This is a GUI element representing tags in HTML documents. Each tag belongs to a certain
+ * document. Each page element has a tag name and either an id or at least
+ * an index in the list of siblings of the same type.
  * </p>
  * 
@@ -24,14 +26,18 @@
 public class HTMLPageElement extends HTMLGUIElement {
 
-    /**  */
+    /**
+     * <p>
+     * default serial version UID
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * instantiates a page element with it parent (either a document or another page element)
      * </p>
      *
-     * @param specification
-     * @param parent
+     * @param specification the specification of the page element
+     * @param parent        the parent GUI element
      */
     public HTMLPageElement(HTMLPageElementSpec specification, HTMLGUIElement parent) {
@@ -41,20 +47,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the name of the tag represented by this specification
      * </p>
      *
-     * @param specification
-     * @param parent
-     */
-    public HTMLPageElement(HTMLPageElementSpec specification, HTMLDocument parent) {
-        super(specification, parent);
-    }
-
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
+     * @return the name of the tag represented by this specification
      */
     public String getTagName() {
@@ -64,8 +58,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the id of the tag represented by this specification
      * </p>
      *
-     * @return
+     * @return the id of the tag represented by this specification
      */
     public String getHtmlId() {
@@ -75,8 +69,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the index of the tag
      * </p>
      *
-     * @return
+     * @return the index of the tag
      */
     public int getIndex() {
@@ -94,14 +88,3 @@
     }
 
-    /**
-     * <p>
-     * TODO: comment
-     * </p>
-     *
-     * @return
-     */
-    HTMLDocumentSpec getPage() {
-        return ((HTMLPageElementSpec) super.getSpecification()).getPage();
-    }
-
 }
Index: trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElementSpec.java
===================================================================
--- trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElementSpec.java	(revision 1264)
+++ trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLPageElementSpec.java	(revision 1276)
@@ -19,5 +19,8 @@
 /**
  * <p>
- * TODO comment
+ * This is a GUI element specification for tags in HTML documents. Each tag belongs to a certain
+ * document. However, for similarity comparison, two page elements are similar even if they do
+ * not belong to the same document. Each page element has a tag name and either an id or at least
+ * an index in the list of siblings of the same type.
  * </p>
  * 
@@ -26,27 +29,56 @@
 public class HTMLPageElementSpec extends HTMLGUIElementSpec implements IGUIElementSpec {
 
-    /**  */
+    /**
+     * <p>
+     * default serial version UID
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
     
-    /** */
+    /**
+     * <p>
+     * the page to which the represented tag belongs
+     * </p>
+     */
     private HTMLDocumentSpec page;
     
-    /** */
+    /**
+     * <p>
+     * the name of the tag represented by this specification
+     * </p>
+     */
     private String tagName;
     
-    /** */
+    /**
+     * <p>
+     * the id of the tag represented by this specification, i.e., the value of the id attribute
+     * of the tag. May be null in the case the id attribute of the tag is not set. 
+     * </p>
+     */
     private String htmlId;
     
-    /** */
+    /**
+     * <p>
+     * the index of the tag (0 based) in the list of siblings in the same parent being of the
+     * same type. If, e.g., a parent has three li tags as children, the first will have index 0,
+     * the second index 1 and the third index2. The indexes are ignored, if the tag have an
+     * assigned id. 
+     * </p>
+     */
     private int index;
 
     /**
      * <p>
-     * TODO: comment
+     * initializes the specification with the page to which the represented tag belongs, the tags
+     * name, its id or its index.
      * </p>
      *
-     * @param type
-     * @param index
-     * @param id
+     * @param page    the page to which the represented tag belongs
+     * @param tagName the name of the tag represented by this specification
+     * @param htmlId  the id of the tag represented by this specification
+     * @param index   the index of the tag
+     * 
+     * @throws IllegalArgumentException if page and name are null or if neither an id nor an index
+     *                                  are provided correctly
      */
     public HTMLPageElementSpec(HTMLDocumentSpec page, String tagName, String htmlId, int index) {
@@ -118,8 +150,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the page to which the represented tag belongs
      * </p>
      *
-     * @return
+     * @return the page to which the represented tag belongs
      */
     HTMLDocumentSpec getPage() {
@@ -129,8 +161,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the name of the tag represented by this specification
      * </p>
      *
-     * @return
+     * @return the name of the tag represented by this specification
      */
     String getTagName() {
@@ -140,8 +172,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the id of the tag represented by this specification
      * </p>
      *
-     * @return
+     * @return the id of the tag represented by this specification
      */
     String getHtmlId() {
@@ -151,8 +183,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the index of the tag
      * </p>
      *
-     * @return
+     * @return the index of the tag
      */
     int getIndex() {
Index: trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServer.java
===================================================================
--- trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServer.java	(revision 1264)
+++ trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServer.java	(revision 1276)
@@ -19,5 +19,6 @@
 /**
  * <p>
- * TODO comment
+ * a GUI element representing an HTML server. This is the root element for a GUI model of
+ * an HTML web site. It is identified through a host and a port. Its children are documents.
  * </p>
  * 
@@ -26,14 +27,21 @@
 public class HTMLServer extends HTMLGUIElement implements IFrame {
 
-    /**  */
+    /**
+     * <p>
+     * default serial version UID
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
 
     /**
      * <p>
-     * TODO: comment
+     * instantiates the server with an appropriate specification
      * </p>
      *
-     * @param specification
-     * @param parent
+     * @param specification the server specification
+     * @param parent        the parent of the server --> must always be null. Just included as
+     *                      required by the automatic instantiation mechanism
+     *                      
+     * @throws IllegalArgumentException if the provided parent is not null
      */
     public HTMLServer(HTMLServerSpec specification, HTMLGUIElement parent) {
@@ -58,8 +66,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the host of the represented server
      * </p>
      *
-     * @return
+     * @return the host
      */
     public String getHost() {
@@ -69,8 +77,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the port of the represented server
      * </p>
      *
-     * @return
+     * @return the port
      */
     public int getPort() {
Index: trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServerSpec.java
===================================================================
--- trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServerSpec.java	(revision 1264)
+++ trunk/autoquest-plugin-html/src/main/java/de/ugoe/cs/autoquest/plugin/html/guimodel/HTMLServerSpec.java	(revision 1276)
@@ -19,5 +19,6 @@
 /**
  * <p>
- * TODO comment
+ * a GUI element specification of an HTML server. This is the root element for a GUI model of
+ * an HTML web site. It is identified through a host and a port. Its children are documents.
  * </p>
  * 
@@ -26,20 +27,34 @@
 public class HTMLServerSpec extends HTMLGUIElementSpec implements IGUIElementSpec {
 
-    /**  */
+    /**
+     * <p>
+     * default serial version UID
+     * </p>
+     */
     private static final long serialVersionUID = 1L;
     
-    /** */
+    /**
+     * <p>
+     * the host of the server
+     * </p>
+     */
     private String host;
     
-    /** */
+    /**
+     * <p>
+     * the port of the server
+     * </p>
+     */
     private int port;
 
     /**
      * <p>
-     * TODO: comment
+     * initialize the server specification with a host and a port.
      * </p>
      *
-     * @param serverName
-     * @param port
+     * @param host the host name of the server
+     * @param port the port number of the server
+     * 
+     * @throws IllegalArgumentException if one of the parameters is invalid (e.g. host = null)
      */
     public HTMLServerSpec(String host, int port) {
@@ -97,8 +112,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the host of the represented server
      * </p>
      *
-     * @return
+     * @return the host
      */
     String getHost() {
@@ -108,8 +123,8 @@
     /**
      * <p>
-     * TODO: comment
+     * returns the port of the represented server
      * </p>
      *
-     * @return
+     * @return the port
      */
     int getPort() {
