diff --git a/CHANGES b/CHANGES
index f39b7d0..b54d356 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,9 @@
+0.31.6 2014-06-30
+        - [feature] support for korap:reference deserialization (diewald)
+	- [feature] Preliminary support for attributes in elements (margaretha)
+	- [feature] Preliminary support operation:repetition deserialization
+	  (unfinished and untested; diewald)
+
 0.31.5 2014-06-17
         - [feature] Batch return of defined foundries and layers in
 	  getMatchInfo() (diewald)
diff --git a/pom.xml b/pom.xml
index 7006850..ec7be9c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
 -->
   <groupId>KorAP-modules</groupId>
   <artifactId>KorAP-lucene-index</artifactId>
-  <version>0.31.5</version>
+  <version>0.31.6</version>
   <packaging>jar</packaging>
 
   <name>KorAP-lucene-index</name>
diff --git a/src/main/java/de/ids_mannheim/korap/KorapQuery.java b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
index 5944f29..1485f5d 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapQuery.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapQuery.java
@@ -189,26 +189,6 @@
 		    this.fromJSON(operands.get(0)), number
                 );
 
-	    case "operation:focus":
-		number = 0;
-
-		if (operands.size() != 1)
-		    throw new QueryException("Operation needs exactly two operands");
-
-		if (json.has("classRef")) {
-		    if (json.has("classRefOp"))
-			throw new QueryException("Class reference operators not supported yet");
-
-		    number = json.get("classRef").get(0).asInt();
-		}
-		else if (json.has("spanRef")) {
-		    throw new QueryException("Span references not supported yet");
-		};
-
-		return new SpanMatchModifyQueryWrapper(
-		    this.fromJSON(operands.get(0)), number
-                );
-
 	    case "operation:sequence":
 		if (operands.size() < 2)
 		    throw new QueryException(
@@ -278,16 +258,67 @@
 		throw new QueryException("Class group expects class attribute");
 
 	    case "operation:repetition":
-		throw new QueryException("Repetition group not yet supported");
 
-		/*
-		  if (json.has("min") || json.has("max"))
-		  throw new QueryException("Quantifier for repetition group not yet supported");
-		*/
+		// temporary
+		int min = json.get("min").asInt(1);
+		int max = json.get("max").asInt(1);
+
+		// Sanitize max
+		if (max < 0)
+		    max = 100;
+		else if (max > 100)
+		    max = 100;
+
+		// Sanitize min
+		if (min < 0)
+		    min = 0;
+		else if (min > 100)
+		    max = 100;
+
+		// Check relation between min and max
+		if (min > max)
+		    throw new QueryException("The maximum repetition value has to " +
+					     "be greater or equal to the minimum repetition value");
+
+		if (min == 0)
+		    throw new QueryException("Minimum value of zero is not supported yet");
+
+		return new SpanRepetitionQueryWrapper(
+		    this.fromJSON(operands.get(0)), min, max
+		);
 	    };
 
 	    throw new QueryException("Unknown group operation");
 
+	case "korap:reference":
+	    if (json.has("operation") && json.get("operation").asText() != "operation:focus")
+		throw new QueryException("Reference operation not supported yet");
+
+	    int number = 0;
+
+	    operands = json.get("operands");
+
+	    if (operands.size() == 0)
+		throw new QueryException("Focus with peripheral references is not supported yet");
+
+	    if (operands.size() != 1)
+		throw new QueryException("Operation needs exactly two operands");
+
+
+	    if (json.has("classRef")) {
+		if (json.has("classRefOp"))
+		    throw new QueryException("Class reference operators not supported yet");
+
+		number = json.get("classRef").get(0).asInt();
+	    }
+	    else if (json.has("spanRef")) {
+		throw new QueryException("Span references not supported yet");
+	    };
+
+	    return new SpanMatchModifyQueryWrapper(
+	        this.fromJSON(operands.get(0)), number
+	    );
+
 	case "korap:token":
 	    if (!json.has("wrap"))
 		throw new QueryException("Tokens need a wrap attribute");
@@ -681,6 +712,16 @@
 	return new SpanMatchModifyQueryWrapper(element);
     };
 
+    // Repetition
+    public SpanRepetitionQueryWrapper repeat (SpanQueryWrapperInterface element, int exact) {
+	return new SpanRepetitionQueryWrapper(element, exact);
+    };
+
+    public SpanRepetitionQueryWrapper repeat (SpanQueryWrapperInterface element, int min, int max) {
+	return new SpanRepetitionQueryWrapper(element, min, max);
+    };
+
+
     // split
 
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java
index a4b1fcb..035e867 100644
--- a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanQueryWrapperInterface.java
@@ -4,6 +4,8 @@
 
 // Todo: Make this an abstract class to deal with regexes in a parent abstract class!
 
+// Add optional and null attributes
+
 public interface SpanQueryWrapperInterface {
     public SpanQuery toQuery ();
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
new file mode 100644
index 0000000..8ab2937
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/query/wrap/SpanRepetitionQueryWrapper.java
@@ -0,0 +1,29 @@
+package de.ids_mannheim.korap.query.wrap;
+
+import org.apache.lucene.search.spans.SpanQuery;
+
+import de.ids_mannheim.korap.query.SpanRepetitionQuery;
+import de.ids_mannheim.korap.query.wrap.SpanQueryWrapperInterface;
+
+
+public class SpanRepetitionQueryWrapper implements SpanQueryWrapperInterface {
+    private SpanQueryWrapperInterface subquery;
+    private int min = 1;
+    private int max = 1;
+
+    public SpanRepetitionQueryWrapper (SpanQueryWrapperInterface subquery, int exact) {
+	this.subquery = subquery;
+	this.min = exact;
+	this.max = exact;
+    };
+
+    public SpanRepetitionQueryWrapper (SpanQueryWrapperInterface subquery, int min, int max) {
+	this.subquery = subquery;
+	this.min = min;
+	this.max = max;
+    };
+
+    public SpanQuery toQuery () {
+	return new SpanRepetitionQuery(this.subquery.toQuery(), this.min, this.max, true);
+    };
+};
