diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralBoundary.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralBoundary.java
index 0faee0e..c28cece 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralBoundary.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralBoundary.java
@@ -3,6 +3,11 @@
 import java.util.LinkedHashMap;
 import java.util.Map;
 
+/** Definition of koral:boundary in KoralQuery.
+ * 
+ * @author margaretha
+ *
+ */
 public class KoralBoundary implements KoralObject {
 
     private static final KoralType type = KoralType.BOUNDARY;
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralContext.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralContext.java
index abdde0b..56f00a1 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralContext.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralContext.java
@@ -1,6 +1,9 @@
 package de.ids_mannheim.korap.query.object;
 
-/**
+/** Context definition for the search scope in WithinQuery,
+ * for instance, a withinquery in poliqarp is
+ * <code>"Bild" within s</code>.
+ * 
  * @author margaretha
  * 
  */
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralDistance.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralDistance.java
index eb88f58..57e1b9a 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralDistance.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralDistance.java
@@ -3,6 +3,11 @@
 import java.util.LinkedHashMap;
 import java.util.Map;
 
+/** Definition of koral:distance in KoralQuery.
+ *  
+ * @author margaretha
+ *
+ */
 public class KoralDistance implements KoralObject {
 
     private final KoralType type = KoralType.DISTANCE;
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralGroup.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralGroup.java
index b304f72..87d98e8 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralGroup.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralGroup.java
@@ -10,7 +10,7 @@
 import de.ids_mannheim.korap.query.object.KoralOperation;
 import de.ids_mannheim.korap.query.object.KoralType;
 
-/**
+/** Definition of koral:group in KoralQuery.
  * @author margaretha
  * 
  */
@@ -25,7 +25,13 @@
     private List<KoralDistance> distances;
     private List<Frame> frames;
     private KoralBoundary boundary;
-
+    
+//    private int[] classIn;
+//    private int classOut;
+//    private int classRefCheck;
+//    private int classRefOp;
+//    private boolean exclude = false;
+    
     public KoralGroup (KoralOperation operation) {
         this.operation = operation;
     }
@@ -94,7 +100,7 @@
         }
 
         List<Map<String, Object>> operandList = new ArrayList<Map<String, Object>>();
-        for (Object o : operands) {
+        for (KoralObject o : operands) {
             operandList.add(MapBuilder.buildQueryMap(o));
         }
         map.put("operands", operandList);
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralMatchOperator.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralMatchOperator.java
index bd5f6ea..2d8997b 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralMatchOperator.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralMatchOperator.java
@@ -1,6 +1,6 @@
 package de.ids_mannheim.korap.query.object;
 
-/**
+/** Definition of the match operations used within koral:term.
  * @author margaretha
  * 
  */
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralObject.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralObject.java
index 21fcf67..2fd4563 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralObject.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralObject.java
@@ -8,5 +8,9 @@
  */
 public interface KoralObject {
 
+    /** Serializes the KoralObject into JSON-LD and structures it as a map.  
+     * 
+     * @return a map containing parts of the JSON-LD serialization of the Koral object.
+     */
     public Map<String, Object> buildMap();
 }
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralOperation.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralOperation.java
index 972bfd3..d81557f 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralOperation.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralOperation.java
@@ -1,6 +1,6 @@
 package de.ids_mannheim.korap.query.object;
 
-/**
+/** Definition of possible operations within koral:group. 
  * @author margaretha
  * 
  */
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralSpan.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralSpan.java
index 4310bb9..aa299ab 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralSpan.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralSpan.java
@@ -6,7 +6,8 @@
 import de.ids_mannheim.korap.query.serialize.util.KoralException;
 import de.ids_mannheim.korap.query.serialize.util.StatusCodes;
 
-/**
+/** Definition of koral:span in KoralQuery.
+ * 
  * @author margaretha
  *
  */
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralTerm.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralTerm.java
index f9f60cd..9409ab7 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralTerm.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralTerm.java
@@ -8,7 +8,8 @@
 import de.ids_mannheim.korap.query.object.KoralMatchOperator;
 import de.ids_mannheim.korap.query.object.KoralType;
 
-/**
+/** Definition of koral:term in KoralQuery.
+ * 
  * @author margaretha
  * 
  */
@@ -25,6 +26,7 @@
     private KoralTermType type;
     
     private boolean caseSensitive = true;
+    private boolean diacriticSensitive = true; 
 
     public KoralTerm(String key) throws KoralException {
     	if (key == null){
@@ -96,6 +98,14 @@
         this.caseSensitive = isCaseSensitive;
     }
 
+    public boolean isDiacriticSensitive() {
+        return diacriticSensitive;
+    }
+
+    public void setDiacriticSensitive(boolean diacriticSensitive) {
+        this.diacriticSensitive = diacriticSensitive;
+    }
+
     @Override
     public Map<String, Object> buildMap() {
         Map<String, Object> map = new LinkedHashMap<String, Object>();
@@ -103,13 +113,20 @@
         if (!isCaseSensitive()) {
             map.put("caseInsensitive", "true");
         }
-        
+        if (!isDiacriticSensitive()){
+            map.put("diacriticInsensitive", "true");
+        }
+            
         map.put("key", getKey());
         if (value != null){
         	map.put("value", getValue());
         }
-        map.put("foundry", getFoundry());
-        map.put("layer", getLayer());
+        if (foundry != null){
+           map.put("foundry", getFoundry());
+        }
+        if (layer !=null){
+           map.put("layer", getLayer());
+        }
         if (type != null){
         	map.put("type", getType().toString());
         }
@@ -119,6 +136,11 @@
         return map;
     }
 
+    /** Definition of possible types of koral:term.
+     * 
+     * @author margaretha
+     *
+     */
     public enum KoralTermType {
         STRING("type:string"), REGEX("type:regex"), WILDCARD("type:wildcard"), PUNCT(
                 "type:punct");
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralTermGroup.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralTermGroup.java
index eaae803..c4b1b63 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralTermGroup.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralTermGroup.java
@@ -8,7 +8,8 @@
 import de.ids_mannheim.korap.query.serialize.MapBuilder;
 import de.ids_mannheim.korap.query.serialize.util.KoralException;
 
-/**
+/** Definition of koral:termGroup in KoralQuery.
+ * 
  * @author margaretha
  * 
  */
@@ -19,7 +20,7 @@
     private String relation;
     private List<KoralObject> operands = new ArrayList<KoralObject>();
 
-    public KoralTermGroup (KoralRelation relation, List<KoralObject> operands)
+    public KoralTermGroup (KoralTermGroupRelation relation, List<KoralObject> operands)
             throws KoralException {
         this.relation = relation.toString();
         this.operands = operands;
@@ -48,7 +49,7 @@
         map.put("relation", getRelation());
 
         List<Map<String, Object>> operandList = new ArrayList<Map<String, Object>>();
-        for (Object o : getOperands()) {
+        for (KoralObject o : getOperands()) {
             operandList.add(MapBuilder.buildQueryMap(o));
         }
         map.put("operands", operandList);
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralTermGroupRelation.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralTermGroupRelation.java
index 84a1ff8..3c7707e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralTermGroupRelation.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralTermGroupRelation.java
@@ -1,10 +1,11 @@
 package de.ids_mannheim.korap.query.object;
 
-/**
+/** Definition of the relations used within koral:termGroup.
+ * 
  * @author margaretha
  * 
  */
-public enum KoralRelation {
+public enum KoralTermGroupRelation {
 
     AND, OR;
 
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralToken.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralToken.java
index 7798566..431b3ea 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralToken.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralToken.java
@@ -6,7 +6,8 @@
 import de.ids_mannheim.korap.query.object.KoralObject;
 import de.ids_mannheim.korap.query.object.KoralType;
 
-/**
+/** Definition of koral:token in KoralQuery.
+ * 
  * @author margaretha
  * 
  */
diff --git a/src/main/java/de/ids_mannheim/korap/query/object/KoralType.java b/src/main/java/de/ids_mannheim/korap/query/object/KoralType.java
index df7608f..4992f43 100644
--- a/src/main/java/de/ids_mannheim/korap/query/object/KoralType.java
+++ b/src/main/java/de/ids_mannheim/korap/query/object/KoralType.java
@@ -1,6 +1,7 @@
 package de.ids_mannheim.korap.query.object;
 
-/**
+/** Definition of various types of KoralQuery building objects.
+ *  
  * @author margaretha
  * 
  */
diff --git a/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java b/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java
index 42f5f83..1fd9f6e 100644
--- a/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java
+++ b/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/ExpressionParser.java
@@ -8,7 +8,7 @@
 
 import de.ids_mannheim.korap.query.object.KoralMatchOperator;
 import de.ids_mannheim.korap.query.object.KoralObject;
-import de.ids_mannheim.korap.query.object.KoralRelation;
+import de.ids_mannheim.korap.query.object.KoralTermGroupRelation;
 import de.ids_mannheim.korap.query.object.KoralTerm;
 import de.ids_mannheim.korap.query.object.KoralTerm.KoralTermType;
 import de.ids_mannheim.korap.query.object.KoralTermGroup;
@@ -26,6 +26,9 @@
 import eu.clarin.sru.server.fcs.parser.RegexFlag;
 
 /**
+ * This class handles and parses various FCSQL expressions (e.g.
+ * simple and boolean expressions) into a KoralObject.
+ * 
  * @author margaretha
  * 
  */
@@ -41,10 +44,34 @@
             .asList(new String[] { FOUNDRY_CNX, FOUNDRY_OPENNLP, FOUNDRY_TT,
                     FOUNDRY_MATE, FOUNDRY_XIP });
 
-    public KoralObject parseExpression(QueryNode queryNode) throws KoralException {
+    /**
+     * Parses the given query node and constructs a koral object
+     * representation of it.
+     * 
+     * @param queryNode
+     *            an FCSQL query node
+     * @return a koral object representation of the given node
+     * @throws KoralException
+     */
+    public KoralObject parseExpression(QueryNode queryNode)
+            throws KoralException {
         return parseExpression(queryNode, false, true);
     }
 
+    /**
+     * Parses the given query node using the specified parameters.
+     * 
+     * @param queryNode
+     *            an FCSQL query node
+     * @param isNot
+     *            a boolean value indicating if the query node was
+     *            negated or not.
+     * @param isToken
+     *            a boolean value indicating if the query node is a
+     *            token or not.
+     * @return a koral object representation of the given node
+     * @throws KoralException
+     */
     public KoralObject parseExpression(QueryNode queryNode, boolean isNot,
             boolean isToken) throws KoralException {
 
@@ -54,10 +81,12 @@
         else if (queryNode instanceof ExpressionAnd) {
             List<QueryNode> operands = queryNode.getChildren();
             if (isNot) {
-                return parseBooleanExpression(operands, KoralRelation.OR);
+                return parseBooleanExpression(operands,
+                        KoralTermGroupRelation.OR);
             }
             else {
-                return parseBooleanExpression(operands, KoralRelation.AND);
+                return parseBooleanExpression(operands,
+                        KoralTermGroupRelation.AND);
             }
         }
         else if (queryNode instanceof ExpressionGroup) {
@@ -71,10 +100,12 @@
         else if (queryNode instanceof ExpressionOr) {
             List<QueryNode> operands = queryNode.getChildren();
             if (isNot) {
-                return parseBooleanExpression(operands, KoralRelation.AND);
+                return parseBooleanExpression(operands,
+                        KoralTermGroupRelation.AND);
             }
             else {
-                return parseBooleanExpression(operands, KoralRelation.OR);
+                return parseBooleanExpression(operands,
+                        KoralTermGroupRelation.OR);
             }
         }
         else if (queryNode instanceof ExpressionWildcard) {
@@ -86,8 +117,20 @@
         }
     }
 
+    /**
+     * Handles a boolean expression by parsing the given operands and
+     * creates a koral token using the parsed operands and the given
+     * relation.
+     * 
+     * @param operands
+     *            a list of query node
+     * @param relation
+     *            the boolean operator
+     * @return a koral token
+     * @throws KoralException
+     */
     private KoralToken parseBooleanExpression(List<QueryNode> operands,
-            KoralRelation relation) throws KoralException {
+            KoralTermGroupRelation relation) throws KoralException {
         List<KoralObject> terms = new ArrayList<>();
         for (QueryNode node : operands) {
             terms.add(parseExpression(node, false, false));
@@ -96,8 +139,23 @@
         return new KoralToken(termGroup);
     }
 
-    private KoralObject parseSimpleExpression(Expression expression, boolean isNot,
-            boolean isToken) throws KoralException {
+    /**
+     * Parses the given simple expression considering the other
+     * specified parameters.
+     * 
+     * @param expression
+     *            a simple expression
+     * @param isNot
+     *            a boolean value indicating if the expression was
+     *            negated or not.
+     * @param isToken
+     *            a boolean value indicating if the expression is a
+     *            token or not.
+     * @return
+     * @throws KoralException
+     */
+    private KoralObject parseSimpleExpression(Expression expression,
+            boolean isNot, boolean isToken) throws KoralException {
         KoralTerm koralTerm = parseTerm(expression, isNot);
         if (isToken) {
             return new KoralToken(koralTerm);
@@ -107,9 +165,21 @@
         }
     }
 
-    public KoralTerm parseTerm(Expression expression, boolean isNot) throws KoralException {
-    	KoralTerm koralTerm = null;
-    	koralTerm = new KoralTerm(expression.getRegexValue());
+    /**
+     * Parses the given expression and constructs a KoralTerm.
+     * 
+     * @param expression
+     *            an expression
+     * @param isNot
+     *            a boolean value indicating if the expression was
+     *            negated or not.
+     * @return a koral term
+     * @throws KoralException
+     */
+    public KoralTerm parseTerm(Expression expression, boolean isNot)
+            throws KoralException {
+        KoralTerm koralTerm = null;
+        koralTerm = new KoralTerm(expression.getRegexValue());
         koralTerm.setType(KoralTermType.REGEX);
         parseLayerIdentifier(koralTerm, expression.getLayerIdentifier());
         parseQualifier(koralTerm, expression.getLayerQualifier());
@@ -118,7 +188,18 @@
         return koralTerm;
     }
 
-    private void parseLayerIdentifier(KoralTerm koralTerm, String identifier) throws KoralException {
+    /**
+     * Parses the given layer identifier and adds it to the koral
+     * term.
+     * 
+     * @param koralTerm
+     *            a koral term
+     * @param identifier
+     *            a layer identifier
+     * @throws KoralException
+     */
+    private void parseLayerIdentifier(KoralTerm koralTerm, String identifier)
+            throws KoralException {
         String layer = null;
         if (identifier == null) {
             throw new KoralException(StatusCodes.MALFORMED_QUERY,
@@ -142,7 +223,17 @@
         koralTerm.setLayer(layer);
     }
 
-    private void parseQualifier(KoralTerm koralTerm, String qualifier) throws KoralException {
+    /**
+     * Parses the given layer qualifier and adds it to the koral term.
+     * 
+     * @param koralTerm
+     *            a koral term
+     * @param qualifier
+     *            a layer qualifier
+     * @throws KoralException
+     */
+    private void parseQualifier(KoralTerm koralTerm, String qualifier)
+            throws KoralException {
         String layer = koralTerm.getLayer();
         if (layer == null) {
             return;
@@ -158,7 +249,7 @@
         }
         else if (qualifier.equals(FOUNDRY_OPENNLP) && layer.equals("l")) {
             throw new KoralException(StatusCodes.UNKNOWN_QUERY_ELEMENT,
-                            "SRU diagnostic 48: Layer lemma with qualifier opennlp is unsupported.");
+                    "SRU diagnostic 48: Layer lemma with qualifier opennlp is unsupported.");
         }
         else if (!supportedFoundries.contains(qualifier)) {
             throw new KoralException(StatusCodes.UNKNOWN_QUERY_ELEMENT,
@@ -169,27 +260,51 @@
         koralTerm.setFoundry(qualifier);
     }
 
+    /**
+     * Parses the given match operator and adds it to the koral term.
+     * 
+     * @param koralTerm
+     *            a koral term
+     * @param operator
+     *            a match operator
+     * @param isNot
+     *            a boolean value indicating if there was a negation
+     *            or not.
+     * @throws KoralException
+     */
     private void parseOperator(KoralTerm koralTerm, Operator operator,
             boolean isNot) throws KoralException {
-    	KoralMatchOperator matchOperator = null;
+        KoralMatchOperator matchOperator = null;
         if (operator == null || operator == Operator.EQUALS) {
-            matchOperator = isNot ? KoralMatchOperator.NOT_EQUALS : KoralMatchOperator.EQUALS;
+            matchOperator = isNot ? KoralMatchOperator.NOT_EQUALS
+                    : KoralMatchOperator.EQUALS;
         }
         else if (operator == Operator.NOT_EQUALS) {
-            matchOperator = isNot ? KoralMatchOperator.EQUALS : KoralMatchOperator.NOT_EQUALS;
+            matchOperator = isNot ? KoralMatchOperator.EQUALS
+                    : KoralMatchOperator.NOT_EQUALS;
         }
         else {
-        	throw new KoralException(StatusCodes.UNKNOWN_QUERY_ELEMENT,
-                            "SRU diagnostic 37:" + operator.name()
-                                    + " is unsupported.");
+            throw new KoralException(StatusCodes.UNKNOWN_QUERY_ELEMENT,
+                    "SRU diagnostic 37:" + operator.name() + " is unsupported.");
         }
         koralTerm.setOperator(matchOperator);
     }
 
-    private void parseRegexFlags(KoralTerm koralTerm, Set<RegexFlag> set) throws KoralException {
+    /**
+     * Parses the given set of regex flags and adds them to the koral
+     * term.
+     * 
+     * @param koralTerm
+     *            a koral term
+     * @param set
+     *            a set of regex flags
+     * @throws KoralException
+     */
+    private void parseRegexFlags(KoralTerm koralTerm, Set<RegexFlag> set)
+            throws KoralException {
         // default case sensitive
         if (set == null) return;
-        
+
         ArrayList<String> names = new ArrayList<String>();
         Iterator<RegexFlag> i = set.iterator();
         while (i.hasNext()) {
diff --git a/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/FCSSRUQueryParser.java b/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/FCSSRUQueryParser.java
index 96e12b1..fc0cfcf 100644
--- a/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/FCSSRUQueryParser.java
+++ b/src/main/java/de/ids_mannheim/korap/query/parse/fcsql/FCSSRUQueryParser.java
@@ -25,7 +25,8 @@
 import eu.clarin.sru.server.fcs.parser.SimpleWithin;
 import eu.clarin.sru.server.fcs.parser.SimpleWithin.Scope;
 
-/**
+/** This class handles FCS query nodes from the FCSParser converting FCSQL to Java objects. 
+ * 
  * @author margaretha
  * 
  */
@@ -33,10 +34,18 @@
 
     private ExpressionParser expressionParser;
 
+    /** Constructs the FCSSRUQueryParser.
+     * 
+     */
     public FCSSRUQueryParser () {
         this.expressionParser = new ExpressionParser();
     }
 
+    /** Parses the given query node according to its type.
+     * @param queryNode an FCS a query node
+     * @return a koral object
+     * @throws KoralException
+     */
     public KoralObject parseQueryNode(QueryNode queryNode)
             throws KoralException {
 
@@ -66,17 +75,33 @@
         }
     }
     
+    /** Parses the given query segment into a koral object.
+     * @param segment a query segment
+     * @return a koral object representation of the query segment
+     * @throws KoralException
+     */
     private KoralObject parseQuerySegment(QuerySegment segment)
             throws KoralException {
         KoralObject object = expressionParser.parseExpression(segment.getExpression());
         return handleQuantifier(object, segment.getMinOccurs(), segment.getMaxOccurs());
     }
     
+    /** Parses the given query group into a koral object.
+     * @param group a koral group
+     * @return a koral object
+     * @throws KoralException
+     */
     private KoralObject parseQueryGroup(QueryGroup group) throws KoralException {
         KoralObject object = parseQueryNode(group.getFirstChild());
         return handleQuantifier(object, group.getMinOccurs(), group.getMaxOccurs());
     }
     
+    /** Parses FCSQL quantifier into a koral boundary and adds it to a koral group
+     * @param object a koral object
+     * @param minOccurs minimum occurrences
+     * @param maxOccurs maximum occurrences
+     * @return a koral group or the given koral object when minimum and maximum occurrences are exactly 1.
+     */
     private KoralObject handleQuantifier(KoralObject object, int minOccurs, int maxOccurs){
         if ((minOccurs == 1) && (maxOccurs == 1)) {
             return object;
@@ -92,7 +117,12 @@
         return koralGroup;
     }
     
-    private KoralObject parseWithinQuery(QueryWithWithin queryNode)
+    /** Parses a QueryWithWithin into a koral group.
+     * @param queryNode a query node of type QueryWithWithin
+     * @return a koral group
+     * @throws KoralException
+     */
+    private KoralGroup parseWithinQuery(QueryWithWithin queryNode)
             throws KoralException {
         KoralGroup koralGroup = new KoralGroup(KoralOperation.POSITION);
         koralGroup.setFrames(Arrays.asList(Frame.IS_AROUND));
@@ -104,6 +134,11 @@
         return koralGroup;
     }
 
+    /** Parses the scope of a QueryWithWithin into a koral span.
+     * @param scope the scope of a QueryWithWithin
+     * @return a koral span
+     * @throws KoralException
+     */
     private KoralSpan parseWithinScope(Scope scope) throws KoralException {
         if (scope == null) {
             throw new KoralException(StatusCodes.MALFORMED_QUERY,
@@ -129,6 +164,11 @@
         return new KoralSpan(new KoralTerm(contextSpan));
     }
 
+    /** Parses a query disjunction into a koral group.
+     * @param children a list of query nodes.
+     * @return a koral group with operation disjunction
+     * @throws KoralException
+     */
     private KoralGroup parseQueryDisjunction(List<QueryNode> children) throws KoralException {
         KoralGroup koralGroup = new KoralGroup(KoralOperation.DISJUNCTION);
         List<KoralObject> operands = new ArrayList<KoralObject>();
@@ -139,6 +179,11 @@
         return koralGroup;
     }
 
+    /** Parses a sequence query into a koral group.
+     * @param children a list query nodes.
+     * @return a koral group
+     * @throws KoralException
+     */
     private KoralGroup parseSequenceQuery(List<QueryNode> children)
             throws KoralException {
         KoralGroup koralGroup = new KoralGroup(KoralOperation.SEQUENCE);
@@ -154,7 +199,8 @@
             if (i > 0 && i < size - 1 && findEmptyToken(child)) {
                 QuerySegment qs = (QuerySegment) child;
                 if (isLastTokenEmpty) {
-                    updateBoundary(operands.get(operands.size() - 1), qs);
+                    KoralBoundary boundary = (KoralBoundary) operands.get(operands.size() - 1);
+                    updateBoundary(boundary, qs);
                 }
                 else {
                     operands.add(new KoralBoundary(qs.getMinOccurs(), qs
@@ -177,20 +223,35 @@
         return koralGroup;
     }
 
-    private boolean findEmptyToken(QueryNode child) {
-        if (child instanceof QuerySegment
-                && ((QuerySegment) child).getExpression() instanceof ExpressionWildcard) {
+    /** Determines if there is an empty token in the given query node.
+     * @param node a query node
+     * @return true if an empty token is found or false otherwise.
+     */
+    private boolean findEmptyToken(QueryNode node) {
+        if (node instanceof QuerySegment
+                && ((QuerySegment) node).getExpression() instanceof ExpressionWildcard) {
             return true;
         }
         return false;
     }
 
-    private void updateBoundary(KoralObject koralObject, QuerySegment qs) {
-        KoralBoundary boundary = (KoralBoundary) koralObject;
+    /** Updates the boundary properties with the parameters in the query segment.
+     * @param boundary a koral boundary
+     * @param qs a query segment
+     */
+    private void updateBoundary(KoralBoundary boundary, QuerySegment qs) {
         boundary.setMin(boundary.getMin() + qs.getMinOccurs());
         boundary.setMax(boundary.getMax() + qs.getMaxOccurs());
     }
 
+    /** Creates koral distances from KoralBoundary objects in the given operand list, 
+     * and adds the distances the koral group. Removes the KoralBoundary objects from 
+     * the operand list and returns the new operand list.
+     * 
+     * @param koralGroup a koral group
+     * @param operands a list of koral objects
+     * @return an updated operand lists without KoralBoundary objects 
+     */
     private List<KoralObject> createDistance(KoralGroup koralGroup, List<KoralObject> operands){
         boolean isSubGroupAdded = false;
         List<KoralObject> newOperands = new ArrayList<KoralObject>(
@@ -205,7 +266,7 @@
                 
                 if (koralGroup.getDistances() != null){
                     KoralObject lastOperand = newOperands.get(newOperands.size()-1);
-                    KoralGroup subGroup = createSubGroup(distances, lastOperand, operands.get(i+1));
+                    KoralGroup subGroup = createSequenceGroupWithDistance(distances, lastOperand, operands.get(i+1));
                     newOperands.remove(lastOperand);
                     newOperands.add(subGroup);
                     isSubGroupAdded = true;
@@ -228,7 +289,15 @@
         return newOperands;
     }
     
-    private KoralGroup createSubGroup(List<KoralDistance> distances, 
+    /** Creates a distance query, namely a koral group of operation sequence 
+     * with the given distances and operands.
+     *  
+     * @param distances a list of distances.
+     * @param operand an operand
+     * @param operand2 another operand
+     * @return a koral group
+     */
+    private KoralGroup createSequenceGroupWithDistance(List<KoralDistance> distances, 
             KoralObject operand, KoralObject operand2) {
         KoralGroup subGroup = new KoralGroup(KoralOperation.SEQUENCE);
         subGroup.setDistances(distances);
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java b/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java
index 369e8e3..06036ad 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/FCSQLQueryProcessor.java
@@ -2,6 +2,7 @@
 
 import java.util.Map;
 
+import de.ids_mannheim.korap.query.object.KoralObject;
 import de.ids_mannheim.korap.query.parse.fcsql.FCSSRUQueryParser;
 import de.ids_mannheim.korap.query.serialize.util.KoralException;
 import de.ids_mannheim.korap.query.serialize.util.StatusCodes;
@@ -11,7 +12,9 @@
 import eu.clarin.sru.server.fcs.parser.QueryParser;
 import eu.clarin.sru.server.fcs.parser.QueryParserException;
 
-/**
+/** FCSQLQueryProcessor is accountable for the serialization of FCSQL to KoralQuery.
+ * The KoralQuery is structured as a map containing parts of JSON-LD serializations of KoralObjects.  
+ * 
  * @author margaretha
  * 
  */
@@ -34,6 +37,10 @@
     private final QueryParser fcsParser = new QueryParser();
     private String version;
 
+    /** Constructs FCSQLQueryProcessor for the given query and version.
+     * @param query an FCS query string
+     * @param version the FCSQL version of the query
+     */
     public FCSQLQueryProcessor (String query, String version) {
         super();
         this.version = version;
@@ -74,6 +81,10 @@
         return true;
     }
 
+    /** Translates the given FCS query string into an FCSSSRUQuery object.
+     * @param query an FCS query string
+     * @return an FCSSRUQuery
+     */
     private FCSSRUQuery parseQueryStringtoFCSQuery(String query) {
         if ((query == null) || query.isEmpty())
             addError(StatusCodes.NO_QUERY,
@@ -100,9 +111,14 @@
         return fcsQuery;
     }
 
+    /** Generates a query map structure for the given FCS query node.
+     * 
+     * @param queryNode an FCS query node
+     * @throws KoralException
+     */
     private void parseFCSQueryToKoralQuery(QueryNode queryNode) throws KoralException {
         FCSSRUQueryParser parser = new FCSSRUQueryParser();
-        Object o = parser.parseQueryNode(queryNode);
+        KoralObject o = parser.parseQueryNode(queryNode);
         Map<String, Object> queryMap = MapBuilder.buildQueryMap(o);
         if (queryMap != null) requestMap.put("query", queryMap);
     }
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/MapBuilder.java b/src/main/java/de/ids_mannheim/korap/query/serialize/MapBuilder.java
index 9d1c2ee..f80c152 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/MapBuilder.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/MapBuilder.java
@@ -3,18 +3,23 @@
 import java.util.Map;
 
 import de.ids_mannheim.korap.query.object.KoralGroup;
+import de.ids_mannheim.korap.query.object.KoralObject;
 import de.ids_mannheim.korap.query.object.KoralSpan;
 import de.ids_mannheim.korap.query.object.KoralTerm;
 import de.ids_mannheim.korap.query.object.KoralTermGroup;
 import de.ids_mannheim.korap.query.object.KoralToken;
 
-/**
+/** 
  * @author margaretha
  * 
  */
 public class MapBuilder {
 
-    public static Map<String, Object> buildQueryMap(Object o) {
+    /** Builds a query map containing JSON-LD serialization parts of the given KoralObject.
+     * @param o
+     * @return a map
+     */
+    public static Map<String, Object> buildQueryMap(KoralObject o) {
         if (o != null) {
             if (o instanceof KoralToken) {
                 KoralToken token = (KoralToken) o;
diff --git a/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralException.java b/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralException.java
index 34d4569..343c2ae 100644
--- a/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralException.java
+++ b/src/main/java/de/ids_mannheim/korap/query/serialize/util/KoralException.java
@@ -1,10 +1,12 @@
 package de.ids_mannheim.korap.query.serialize.util;
 
+/** Define a custom exception for errors in parsing into and serializing KoralQuery.
+ * 
+ * @author margaretha
+ *
+ */
 public class KoralException extends Exception{
-
-	/**
-	 * 
-	 */
+	
 	private static final long serialVersionUID = 5463242042200109417L;
 	private int statusCode;
 	
diff --git a/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLComplexTest.java b/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLComplexTest.java
index eed5aad..973c838 100644
--- a/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLComplexTest.java
+++ b/src/test/java/de/ids_mannheim/korap/query/serialize/FCSQLComplexTest.java
@@ -348,6 +348,15 @@
 
     @Test
     public void testWithinQuery() throws IOException {
+        query = "'grün' within s";
+        jsonLd = "{@type:koral:group,"
+                + "operation:operation:position,"
+                + "operands:["
+                + "{@type:koral:span,wrap:{@type:koral:term,key:s,foundry:base,layer:s}},"
+                + "{@type:koral:token,wrap:{@type:koral:term,key:grün,foundry:opennlp,layer:orth,type:type:regex,match:match:eq}}"
+                + "]}";
+        FCSQLQueryProcessorTest.runAndValidate(query, jsonLd);
+        
         query = "[cnx:pos=\"VVFIN\"] within s";
         jsonLd = "{@type:koral:group,"
                 + "operation:operation:position,"
@@ -419,6 +428,7 @@
 
     @Test
     public void testWrongQuery() throws IOException {
+        // expression should always be within a segment
         query = "!(mate:lemma=\"sein\" | mate:pos=\"PPOSS\")";
         error = FCSQLQueryProcessorTest.getError(new FCSQLQueryProcessor(query,
                 "2.0"));
