diff --git a/lite/pom.xml b/lite/pom.xml
index 02fe1af..fc394fb 100644
--- a/lite/pom.xml
+++ b/lite/pom.xml
@@ -7,7 +7,7 @@
 	<properties>
 		<java.version>1.7</java.version>
 		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<spring-framework.version>4.3.7.RELEASE</spring-framework.version>
+		<spring-framework.version>4.3.11.RELEASE</spring-framework.version>
 		<jersey.version>1.19.4</jersey.version>
 	</properties>
 
diff --git a/lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java b/lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
index 476b6bf..e86279d 100644
--- a/lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
+++ b/lite/src/main/java/de/ids_mannheim/korap/web/service/light/LightService.java
@@ -4,12 +4,14 @@
 import java.util.List;
 import java.util.Set;
 
+import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
@@ -33,7 +35,6 @@
 import de.ids_mannheim.korap.utils.KustvaktLogger;
 import de.ids_mannheim.korap.web.ClientsHandler;
 import de.ids_mannheim.korap.web.SearchKrill;
-import de.ids_mannheim.korap.web.TRACE;
 import de.ids_mannheim.korap.web.utils.KustvaktResponseHandler;
 
 /**
@@ -41,7 +42,14 @@
  * @date 29/01/2014
  * 
  * @author margaretha
- * @date 21/09/2017
+ * @update 10/10/2017
+ * 
+ * <pre>
+ * Recent changes:
+ * - removed version from service paths
+ * - altered service with path /search and method trace to path
+ * /query and method get
+ * </pre>
  */
 @Controller
 @Path("/")
@@ -90,15 +98,16 @@
     }
 
 
-    @TRACE
-    @Path("search")
+    @GET
+    @Path("query")
     public Response buildQuery (@QueryParam("q") String q,
             @QueryParam("ql") String ql, @QueryParam("v") String v,
             @QueryParam("context") String context,
             @QueryParam("cutoff") Boolean cutoff,
             @QueryParam("count") Integer pageLength,
             @QueryParam("offset") Integer pageIndex,
-            @QueryParam("page") Integer startPage, @QueryParam("cq") String cq) {
+            @QueryParam("page") Integer startPage,
+            @QueryParam("cq") String cq) {
         QuerySerializer ss = new QuerySerializer().setQuery(q, ql, v);
 
         MetaQueryBuilder meta = new MetaQueryBuilder();
@@ -109,8 +118,7 @@
         meta.setSpanContext(context);
         meta.addEntry("cutOff", cutoff);
         ss.setMeta(meta.raw());
-        if (cq != null)
-            ss.setCollection(cq);
+        if (cq != null) ss.setCollection(cq);
 
         String query;
         try {
@@ -125,7 +133,8 @@
 
     @POST
     @Path("search")
-    public Response queryRaw (@QueryParam("engine") String engine, String jsonld) {
+    public Response queryRaw (@QueryParam("engine") String engine,
+            String jsonld) {
         try {
             jsonld = processor.processQuery(jsonld, null);
         }
@@ -136,10 +145,10 @@
         jlog.info("Serialized search: {}", jsonld);
         try {
             String result = searchKrill.search(jsonld);
-            KustvaktLogger.QUERY_LOGGER.trace("The result set: {}", result);
+            jlog.debug("The result set: {}", result);
             return Response.ok(result).build();
-        } catch(Exception e) {
-            System.out.println("_____________________________________" );
+        }
+        catch (Exception e) {
             e.printStackTrace();
         }
         return Response.ok().build();
@@ -167,8 +176,7 @@
         if (fields != null && !fields.isEmpty())
             meta.addEntry("fields", fields);
         serializer.setMeta(meta.raw());
-        if (cq != null)
-            serializer.setCollection(cq);
+        if (cq != null) serializer.setCollection(cq);
 
         String query;
         try {
@@ -225,8 +233,9 @@
      * @return
      */
     //fixme: search in collection /collection/collection-id/search
+    @Deprecated
     @GET
-    @Path("/{type}/{id}/search")
+    //    @Path("/{type}/{id}/search")
     public Response searchbyName (@PathParam("id") String id,
             @PathParam("type") String type, @QueryParam("q") String query,
             @QueryParam("ql") String ql, @QueryParam("v") String v,
@@ -257,10 +266,9 @@
         String result;
         try {
             if (eng.equals(KustvaktConfiguration.BACKENDS.NEO4J)) {
-                if (raw)
-                    throw KustvaktResponseHandler.throwit(
-                            StatusCodes.ILLEGAL_ARGUMENT, "raw not supported!",
-                            null);
+                if (raw) throw KustvaktResponseHandler.throwit(
+                        StatusCodes.ILLEGAL_ARGUMENT, "raw not supported!",
+                        null);
                 MultivaluedMap map = new MultivaluedMapImpl();
                 map.add("q", query);
                 map.add("count", String.valueOf(pageLength));
@@ -284,55 +292,44 @@
     }
 
 
-//    //todo: switch to new serialization
-//    @POST
-//    @Path("stats")
-//    public Response getStats (String json) {
-//        KoralCollectionQueryBuilder builder = new KoralCollectionQueryBuilder();
-//        builder.with(json);
-//
-//        // todo: policy override in extension!
-//        String stats = searchKrill.getStatistics(builder.toJSON());
-//        if (stats.contains("-1"))
-//            throw KustvaktResponseHandler.throwit(StatusCodes.NO_VALUE_FOUND);
-//
-//        return Response.ok(stats).build();
-//    }
-    
     @GET
     @Path("statistics")
-    public Response getStatistics (@QueryParam("collectionQuery") 
-            String collectionQuery) {
-        
+    public Response getStatistics (
+            @QueryParam("collectionQuery") String collectionQuery) {
+
         KoralCollectionQueryBuilder builder = new KoralCollectionQueryBuilder();
         builder.with(collectionQuery);
         String json = builder.toJSON();
-        
+
         String stats = searchKrill.getStatistics(json);
         if (stats.contains("-1"))
             throw KustvaktResponseHandler.throwit(StatusCodes.NO_VALUE_FOUND);
-        jlog.debug("Stats: "+stats);
+        jlog.debug("Stats: " + stats);
         return Response.ok(stats).build();
     }
 
 
 
-	/*
-	 * TODO: The problem here is, that the matchinfo path makes no
-	 * distinction between docs and texts - unlike DeReKo, the backend
-	 * and the frontend. Luckily there is a convenient method
-	 * "getMatchID()" for a workaround, but this should be fixed.
-	 */
+    /*
+     * TODO: The problem here is, that the matchinfo path makes no
+     * distinction between docs and texts - unlike DeReKo, the backend
+     * and the frontend. Luckily there is a convenient method
+     * "getMatchID()" for a workaround, but this should be fixed.
+     */
     @GET
     @Path("/corpus/{corpusId}/{docId}/{textId}/{matchId}/matchInfo")
     public Response getMatchInfo (@PathParam("corpusId") String corpusId,
             @PathParam("docId") String docId,
-            @PathParam("textId") String textId, 
+            @PathParam("textId") String textId,
             @PathParam("matchId") String matchId,
             @QueryParam("foundry") Set<String> foundries,
             @QueryParam("layer") Set<String> layers,
-            @QueryParam("spans") Boolean spans) throws KustvaktException {
-        String matchid = searchKrill.getMatchId(corpusId, docId, textId, matchId);
+            @QueryParam("spans") Boolean spans,
+            @Context HttpServletRequest request) throws KustvaktException {
+
+        String matchid =
+                searchKrill.getMatchId(corpusId, docId, textId, matchId);
+        
         List<String> f_list = null;
         List<String> l_list = null;
         if (layers != null && !layers.isEmpty())
@@ -343,14 +340,14 @@
             f_list = new ArrayList<>(foundries);
 
         spans = spans != null ? spans : false;
-		
+
         boolean match_only = foundries == null || foundries.isEmpty();
         String results;
         if (match_only)
-            results = searchKrill.getMatch(matchid,null);
+            results = searchKrill.getMatch(matchid, null);
         else
             results = searchKrill.getMatch(matchid, f_list, l_list, spans,
-                    false, true,null);
+                    false, true, null);
 
         return Response.ok(results).build();
     }
diff --git a/lite/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyLightTest.java b/lite/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyLightTest.java
index 8d87265..81ae635 100644
--- a/lite/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyLightTest.java
+++ b/lite/src/test/java/de/ids_mannheim/korap/web/service/FastJerseyLightTest.java
@@ -23,7 +23,7 @@
     }
 
     @Before
-    public static void startServerBeforeFirstTestRun () {
+    public void startServerBeforeFirstTestRun () {
         if (testContainer == null) {
             initServer(PORT, classPackages);
             startServer();
diff --git a/lite/src/test/java/de/ids_mannheim/korap/web/service/LightServiceTest.java b/lite/src/test/java/de/ids_mannheim/korap/web/service/LightServiceTest.java
index 17c7df6..e0ecf31 100644
--- a/lite/src/test/java/de/ids_mannheim/korap/web/service/LightServiceTest.java
+++ b/lite/src/test/java/de/ids_mannheim/korap/web/service/LightServiceTest.java
@@ -5,8 +5,6 @@
 import static org.junit.Assert.assertNotNull;
 
 import org.apache.lucene.LucenePackage;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 
 import com.fasterxml.jackson.databind.JsonNode;
@@ -17,28 +15,48 @@
 import de.ids_mannheim.korap.utils.JsonUtils;
 
 /**
- * EM: FIX ME: Database restructure
- * 
  * Created by hanl on 29.04.16.
+ * 
+ * @author margaretha
+ * @date 10/10/2017
+ * 
+ * Recent changes:
+ * - updated the service paths and methods of query serialization tests
+ * - added statistic service test
  */
-@Ignore
 public class LightServiceTest extends FastJerseyLightTest {
 
     @Override
     public void initMethod () throws KustvaktException {}
 
-
     @Test
-    public void testQueryTrace () {
-        ClientResponse response = resource().path(getAPIVersion())
-                .path("search").queryParam("q", "[orth=das]")
-                .queryParam("ql", "poliqarp").queryParam("context", "sentence")
-                .queryParam("count", "13")
-                .method("TRACE", ClientResponse.class);
+    public void testStatistics () {
+        ClientResponse response = resource()
+                .path("statistics")
+                .queryParam("collectionQuery", "textType=Autobiographie & corpusSigle=GOE")
+                .method("GET", ClientResponse.class);
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
         String query = response.getEntity(String.class);
         JsonNode node = JsonUtils.readTree(query);
+        assertEquals(9, node.at("/documents").asInt());
+        assertEquals(527662, node.at("/tokens").asInt());
+        assertEquals(19387, node.at("/sentences").asInt());
+        assertEquals(514, node.at("/paragraphs").asInt());
+    }
+
+    @Test
+    public void testGetJSONQuery () {
+        ClientResponse response = resource()
+                .path("query").queryParam("q", "[orth=das]")
+                .queryParam("ql", "poliqarp").queryParam("context", "sentence")
+                .queryParam("count", "13")
+                .method("GET", ClientResponse.class);
+        assertEquals(ClientResponse.Status.OK.getStatusCode(),
+                response.getStatus());
+        String query = response.getEntity(String.class);
+        System.out.println(query);
+        JsonNode node = JsonUtils.readTree(query);
         assertNotNull(node);
         assertEquals("orth", node.at("/query/wrap/layer").asText());
         assertEquals("opennlp", node.at("/query/wrap/foundry").asText());
@@ -49,11 +67,11 @@
 
     @Test
     public void testbuildAndPostQuery () {
-        ClientResponse response = resource().path(getAPIVersion())
-                .path("search").queryParam("q", "[orth=das]")
+        ClientResponse response = resource()
+                .path("query").queryParam("q", "[orth=das]")
                 .queryParam("ql", "poliqarp")
                 .queryParam("cq", "corpusSigle=WPD | corpusSigle=GOE")
-                .method("TRACE", ClientResponse.class);
+                .method("GET", ClientResponse.class);
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
 
@@ -61,7 +79,7 @@
         JsonNode node = JsonUtils.readTree(query);
         assertNotNull(node);
 
-        response = resource().path(getAPIVersion()).path("search")
+        response = resource().path("search")
                 .post(ClientResponse.class, query);
 
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
@@ -74,7 +92,7 @@
 
     @Test
     public void testQueryGet () {
-        ClientResponse response = resource().path(getAPIVersion())
+        ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=das]")
                 .queryParam("ql", "poliqarp").queryParam("context", "sentence")
                 .queryParam("count", "13").get(ClientResponse.class);
@@ -92,7 +110,7 @@
 
     @Test
     public void testFoundryRewrite () {
-        ClientResponse response = resource().path(getAPIVersion())
+        ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=das]")
                 .queryParam("ql", "poliqarp").queryParam("context", "sentence")
                 .queryParam("count", "13").get(ClientResponse.class);
@@ -111,7 +129,7 @@
         QuerySerializer s = new QuerySerializer();
         s.setQuery("[orth=das]", "poliqarp");
 
-        ClientResponse response = resource().path(getAPIVersion())
+        ClientResponse response = resource()
                 .path("search").post(ClientResponse.class, s.toJSON());
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
@@ -125,7 +143,7 @@
 
     @Test
     public void testParameterField () {
-        ClientResponse response = resource().path(getAPIVersion())
+        ClientResponse response = resource()
                 .path("search").queryParam("q", "[orth=das]")
                 .queryParam("ql", "poliqarp")
                 .queryParam("fields", "author, docSigle")
@@ -145,7 +163,7 @@
 	@Test
 	public void testMatchInfoGetWithoutSpans () {
         ClientResponse response = resource()
-			.path(getAPIVersion())
+			
 			.path("corpus/GOE/AGA/01784/p36-46/matchInfo")
 			.queryParam("foundry", "*")
 			.queryParam("spans", "false")
@@ -162,7 +180,7 @@
 	@Test
 	public void testMatchInfoGet2 () {
         ClientResponse response = resource()
-			.path(getAPIVersion())
+			
 			.path("corpus/GOE/AGA/01784/p36-46/matchInfo")
 			.queryParam("foundry", "*")
 			.get(ClientResponse.class);
@@ -176,14 +194,14 @@
 	};
 
     @Test
-    public void testCQParameter () {
-        ClientResponse response = resource().path(getAPIVersion())
-                .path("search").queryParam("q", "[orth=das]")
+    public void testCollectionQueryParameter () {
+        ClientResponse response = resource()
+                .path("query").queryParam("q", "[orth=das]")
                 .queryParam("ql", "poliqarp")
                 .queryParam("fields", "author, docSigle")
                 .queryParam("context", "sentence").queryParam("count", "13")
                 .queryParam("cq", "textClass=Politik & corpus=WPD")
-                .method("TRACE", ClientResponse.class);
+                .method("GET", ClientResponse.class);
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
         String query = response.getEntity(String.class);
@@ -194,15 +212,15 @@
                 .asText());
         assertEquals("WPD", node.at("/collection/operands/1/value").asText());
 
-        response = resource().path(getAPIVersion()).path("search")
+        response = resource().path("search")
                 .queryParam("q", "[orth=das]").queryParam("ql", "poliqarp")
                 .queryParam("fields", "author, docSigle")
                 .queryParam("context", "sentence").queryParam("count", "13")
                 .queryParam("cq", "textClass=Politik & corpus=WPD")
                 .get(ClientResponse.class);
         String version = LucenePackage.get().getImplementationVersion();;
-        System.out.println("VERSION "+ version);
-        System.out.println("RESPONSE "+ response);
+//        System.out.println("VERSION "+ version);
+//        System.out.println("RESPONSE "+ response);
         assertEquals(ClientResponse.Status.OK.getStatusCode(),
                 response.getStatus());
         query = response.getEntity(String.class);
