Renamed /filter to /collection
diff --git a/Changes b/Changes
index 0b28d58..ce82e98 100644
--- a/Changes
+++ b/Changes
@@ -6,6 +6,7 @@
         - [feature] Presorting of element terms in the index for coherent
 	  SpanQuery sorting (diewald)
 	  Warning: This is a breaking change!
+	- [cleanup] Renamed /filter to /collection (diewald)
 
 0.49.3 2015-02-03
         - [documentation] Improved documentation for API classes (diewald)
diff --git a/src/main/java/de/ids_mannheim/korap/KorapCollection.java b/src/main/java/de/ids_mannheim/korap/KorapCollection.java
index 1e0d173..6e4ad8e 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapCollection.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapCollection.java
@@ -6,8 +6,8 @@
 import de.ids_mannheim.korap.*;
 import de.ids_mannheim.korap.util.KorapDate;
 import de.ids_mannheim.korap.util.QueryException;
-import de.ids_mannheim.korap.filter.BooleanFilter;
-import de.ids_mannheim.korap.filter.FilterOperation;
+import de.ids_mannheim.korap.collection.BooleanFilter;
+import de.ids_mannheim.korap.collection.FilterOperation;
 import de.ids_mannheim.korap.response.Notifications;
 
 import org.apache.lucene.search.spans.SpanQuery;
diff --git a/src/main/java/de/ids_mannheim/korap/KorapFilter.java b/src/main/java/de/ids_mannheim/korap/KorapFilter.java
index 539c061..b567741 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapFilter.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapFilter.java
@@ -1,7 +1,7 @@
 package de.ids_mannheim.korap;
 
-import de.ids_mannheim.korap.filter.BooleanFilter;
-import de.ids_mannheim.korap.filter.RegexFilter;
+import de.ids_mannheim.korap.collection.BooleanFilter;
+import de.ids_mannheim.korap.collection.RegexFilter;
 import de.ids_mannheim.korap.util.QueryException;
 import de.ids_mannheim.korap.util.KorapDate;
 
@@ -21,7 +21,7 @@
 */
 
 /**
- * @author Nils Diewald
+ * @author diewald
  *
  * KorapFilter implements a simple API for creating meta queries
  * constituing Virtual Collections.
diff --git a/src/main/java/de/ids_mannheim/korap/filter/BooleanFilter.java b/src/main/java/de/ids_mannheim/korap/collection/BooleanFilter.java
similarity index 97%
rename from src/main/java/de/ids_mannheim/korap/filter/BooleanFilter.java
rename to src/main/java/de/ids_mannheim/korap/collection/BooleanFilter.java
index f288abf..cc9eebe 100644
--- a/src/main/java/de/ids_mannheim/korap/filter/BooleanFilter.java
+++ b/src/main/java/de/ids_mannheim/korap/collection/BooleanFilter.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.filter;
+package de.ids_mannheim.korap.collection;
 
 import java.util.*;
 
@@ -12,7 +12,6 @@
 import org.apache.lucene.search.NumericRangeQuery;
 
 import de.ids_mannheim.korap.util.KorapDate;
-import de.ids_mannheim.korap.filter.RegexFilter;
 import de.ids_mannheim.korap.KorapFilter;
 
 import de.ids_mannheim.korap.util.QueryException;
diff --git a/src/main/java/de/ids_mannheim/korap/filter/FilterOperation.java b/src/main/java/de/ids_mannheim/korap/collection/FilterOperation.java
similarity index 94%
rename from src/main/java/de/ids_mannheim/korap/filter/FilterOperation.java
rename to src/main/java/de/ids_mannheim/korap/collection/FilterOperation.java
index 20dde1c..8f8b07b 100644
--- a/src/main/java/de/ids_mannheim/korap/filter/FilterOperation.java
+++ b/src/main/java/de/ids_mannheim/korap/collection/FilterOperation.java
@@ -1,4 +1,5 @@
-package de.ids_mannheim.korap.filter;
+package de.ids_mannheim.korap.collection;
+
 import org.apache.lucene.search.Filter;
 
 public class FilterOperation {
diff --git a/src/main/java/de/ids_mannheim/korap/filter/RegexFilter.java b/src/main/java/de/ids_mannheim/korap/collection/RegexFilter.java
similarity index 63%
rename from src/main/java/de/ids_mannheim/korap/filter/RegexFilter.java
rename to src/main/java/de/ids_mannheim/korap/collection/RegexFilter.java
index 32aca72..d86270e 100644
--- a/src/main/java/de/ids_mannheim/korap/filter/RegexFilter.java
+++ b/src/main/java/de/ids_mannheim/korap/collection/RegexFilter.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.filter;
+package de.ids_mannheim.korap.collection;
 
 import java.util.*;
 
@@ -8,7 +8,8 @@
 /**
  * @author Nils Diewald
  *
- * RegexFilter implements a helper object for regular expressions used in KorapFilter
+ * RegexFilter implements a helper object for
+ * regular expressions used in KorapFilter
  * constraints.
  */
 
@@ -16,12 +17,12 @@
     String regex;
 
     public RegexFilter (String regex) {
-	this.regex = regex;
+        this.regex = regex;
     };
 
     public RegexpQuery toQuery (String field) {
-	return new RegexpQuery(
+        return new RegexpQuery(
             new Term(field, this.regex)
-	);
+        );
     };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java b/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
index 532d2d4..219fcb5 100644
--- a/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
+++ b/src/main/java/de/ids_mannheim/korap/query/spans/WithinSpans.java
@@ -102,10 +102,20 @@
     // was checked yet
     private boolean tryMatch = true;
 
+    // Two buffers for storing candidates
     private LinkedList<KorapLongSpan>
         spanStore1,
         spanStore2;
 
+    /**
+     * Construct a new WithinSpans object.
+     *
+     * @param spanWithinQuery The parental {@link SpanWithinQuery}.
+     * @param context The {@link AtomicReaderContext}.
+     * @param acceptDocs Bit vector representing the documents
+     *        to be searched in.
+     * @param termContexts A map managing {@link TermState}
+     */
     public WithinSpans (SpanWithinQuery spanWithinQuery,
                         AtomicReaderContext context,
                         Bits acceptDocs,
diff --git a/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java b/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java
index 97ca88c..3f7e54e 100644
--- a/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java
+++ b/src/main/java/de/ids_mannheim/korap/response/KorapResponse.java
@@ -37,6 +37,7 @@
     private String benchmark;
     private boolean timeExceeded = false;
 
+
     /**
      * Construct a new KorapResponse object.
      */
diff --git a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
index 1a28f7d..213d11d 100644
--- a/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
+++ b/src/test/java/de/ids_mannheim/korap/benchmark/TestBenchmarkSpans.java
@@ -11,7 +11,7 @@
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.KorapQuery;
 import org.apache.lucene.store.MMapDirectory;
-import de.ids_mannheim.korap.filter.BooleanFilter;
+import de.ids_mannheim.korap.collection.BooleanFilter;
 import org.apache.lucene.search.spans.SpanQuery;
 import de.ids_mannheim.korap.query.wrap.SpanQueryWrapper;
 import de.ids_mannheim.korap.util.QueryException;
diff --git a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java b/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
index a169a8f..eb09d8a 100644
--- a/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
+++ b/src/test/java/de/ids_mannheim/korap/collection/TestKorapCollectionLegacy.java
@@ -8,7 +8,7 @@
 import de.ids_mannheim.korap.KorapFilter;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.KorapQuery;
-import de.ids_mannheim.korap.filter.BooleanFilter;
+import de.ids_mannheim.korap.collection.BooleanFilter;
 
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.spans.SpanOrQuery;
diff --git a/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java b/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
index 9bf4952..5d8b5d2 100644
--- a/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
+++ b/src/test/java/de/ids_mannheim/korap/index/TestWPDIndex.java
@@ -18,7 +18,7 @@
 import de.ids_mannheim.korap.KorapMatch;
 import de.ids_mannheim.korap.KorapResult;
 import de.ids_mannheim.korap.KorapSearch;
-import de.ids_mannheim.korap.filter.BooleanFilter;
+import de.ids_mannheim.korap.collection.BooleanFilter;
 import de.ids_mannheim.korap.query.DistanceConstraint;
 import de.ids_mannheim.korap.query.SpanDistanceQuery;
 import de.ids_mannheim.korap.query.SpanElementQuery;