diff --git a/src/main/java/de/ids_mannheim/korap/response/collector/MatchCollectorDB.java b/src/main/java/de/ids_mannheim/korap/response/collector/MatchCollectorDB.java
index dd2c09f..d58b473 100644
--- a/src/main/java/de/ids_mannheim/korap/response/collector/MatchCollectorDB.java
+++ b/src/main/java/de/ids_mannheim/korap/response/collector/MatchCollectorDB.java
@@ -1,5 +1,5 @@
 package de.ids_mannheim.korap.response.collector;
-import de.ids_mannheim.korap.KorapNode;
+import de.ids_mannheim.korap.server.Node;
 import de.ids_mannheim.korap.response.Match;
 import de.ids_mannheim.korap.response.MatchCollector;
 import com.fasterxml.jackson.annotation.*;
@@ -15,7 +15,7 @@
 public class MatchCollectorDB extends MatchCollector {
 
     // Logger
-    private final static Logger log = LoggerFactory.getLogger(KorapNode.class);
+    private final static Logger log = LoggerFactory.getLogger(Node.class);
 
     /*
      * Todo: In case there are multiple threads searching,
diff --git a/src/main/java/de/ids_mannheim/korap/KorapNode.java b/src/main/java/de/ids_mannheim/korap/server/Node.java
similarity index 94%
rename from src/main/java/de/ids_mannheim/korap/KorapNode.java
rename to src/main/java/de/ids_mannheim/korap/server/Node.java
index 10a9710..4bf00ea 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapNode.java
+++ b/src/main/java/de/ids_mannheim/korap/server/Node.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap;
+package de.ids_mannheim.korap.server;
 
 import java.util.*;
 import java.io.*;
@@ -23,13 +23,13 @@
  *
  * @author diewald
  */
-public class KorapNode {
+public class Node {
 
     // Base URI the Grizzly HTTP server will listen on
     public static String BASE_URI = "http://localhost:8080/";
     
     // Logger
-    private final static Logger log = LoggerFactory.getLogger(KorapNode.class);
+    private final static Logger log = LoggerFactory.getLogger(Node.class);
 
     // Index
     private static KrillIndex index;
@@ -60,7 +60,7 @@
         // Load configuration
         try {
             InputStream file = new FileInputStream(
-                KorapNode.class.getClassLoader()
+                Node.class.getClassLoader()
                 .getResource("server.properties")
                 .getFile()
             );
@@ -69,8 +69,8 @@
 
             // Node properties
             path     = prop.getProperty("lucene.indexDir", path);
-            name     = prop.getProperty("lucene.node.name", name);
-            BASE_URI = prop.getProperty("lucene.node.baseURI", BASE_URI);
+            name     = prop.getProperty("lucene.server.name", name);
+            BASE_URI = prop.getProperty("lucene.server.baseURI", BASE_URI);
 
             // Database properties
             dbUser  = prop.getProperty("lucene.db.user",    dbUser);
@@ -86,7 +86,7 @@
         // create a resource config that scans for JAX-RS resources and providers
         // in de.ids_mannheim.korap.server package
         final ResourceConfig rc =
-            new ResourceConfig().packages("de.ids_mannheim.korap.node");
+            new ResourceConfig().packages("de.ids_mannheim.korap.server");
 
         // create and start a new instance of grizzly http server
         // exposing the Jersey application at BASE_URI
@@ -98,7 +98,7 @@
         // create a resource config that scans for JAX-RS resources and providers
         // in de.ids_mannheim.korap.server package
         final ResourceConfig rc =
-            new ResourceConfig().packages("de.ids_mannheim.korap.node");
+            new ResourceConfig().packages("de.ids_mannheim.korap.server");
 
         name = nodeName;
         path = indexPath;
diff --git a/src/main/java/de/ids_mannheim/korap/node/Ping.java b/src/main/java/de/ids_mannheim/korap/server/Ping.java
similarity index 89%
rename from src/main/java/de/ids_mannheim/korap/node/Ping.java
rename to src/main/java/de/ids_mannheim/korap/server/Ping.java
index 8ae1725..ebaba96 100644
--- a/src/main/java/de/ids_mannheim/korap/node/Ping.java
+++ b/src/main/java/de/ids_mannheim/korap/server/Ping.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.node;
+package de.ids_mannheim.korap.server;
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
diff --git a/src/main/java/de/ids_mannheim/korap/node/Resource.java b/src/main/java/de/ids_mannheim/korap/server/Resource.java
similarity index 91%
rename from src/main/java/de/ids_mannheim/korap/node/Resource.java
rename to src/main/java/de/ids_mannheim/korap/server/Resource.java
index 3e1c3d2..4af504e 100644
--- a/src/main/java/de/ids_mannheim/korap/node/Resource.java
+++ b/src/main/java/de/ids_mannheim/korap/server/Resource.java
@@ -1,4 +1,4 @@
-package de.ids_mannheim.korap.node;
+package de.ids_mannheim.korap.server;
 
 import java.io.*;
 
@@ -20,7 +20,7 @@
 import javax.ws.rs.ext.WriterInterceptorContext;
 import javax.ws.rs.WebApplicationException;
 
-import de.ids_mannheim.korap.KorapNode;
+import de.ids_mannheim.korap.server.Node;
 import de.ids_mannheim.korap.KrillIndex;
 import de.ids_mannheim.korap.Krill;
 import de.ids_mannheim.korap.KrillCollection;
@@ -60,7 +60,7 @@
     private String version;
 
     // Initiate Logger
-    private final static Logger log = LoggerFactory.getLogger(KorapNode.class);
+    private final static Logger log = LoggerFactory.getLogger(Node.class);
 
     // This advices the java compiler to ignore all loggings
     public static final boolean DEBUG = false;
@@ -89,13 +89,13 @@
     @GET
     @Produces(MediaType.APPLICATION_JSON)
     public String info () {
-        KrillIndex index = KorapNode.getIndex();
+        KrillIndex index = Node.getIndex();
         KorapResponse kresp = new KorapResponse();
-        kresp.setNode(KorapNode.getName());
+        kresp.setNode(Node.getName());
         kresp.setName(index.getName());
         kresp.setVersion(index.getVersion());
 
-        kresp.setListener(KorapNode.getListener());
+        kresp.setListener(Node.getListener());
         long texts = -1;
         /*
           kresp.addMessage(
@@ -136,10 +136,10 @@
             log.trace("Added new document with unique identifier {}", uid);
 
         // Get index
-        KrillIndex index = KorapNode.getIndex();
+        KrillIndex index = Node.getIndex();
 
         KorapResponse kresp = new KorapResponse();
-        kresp.setNode(KorapNode.getName());
+        kresp.setNode(Node.getName());
 
         if (index == null) {
             kresp.addError(601, "Unable to find index");
@@ -180,9 +180,9 @@
     public String commit () {
 
         // Get index
-        KrillIndex index = KorapNode.getIndex();
+        KrillIndex index = Node.getIndex();
         KorapResponse kresp = new KorapResponse();
-        kresp.setNode(KorapNode.getName());
+        kresp.setNode(Node.getName());
 
         if (index == null) {
             kresp.addError(601, "Unable to find index");
@@ -219,7 +219,7 @@
     public String find (String json, @Context UriInfo uri) {
 
         // Get index
-        KrillIndex index = KorapNode.getIndex();
+        KrillIndex index = Node.getIndex();
 
         // Search index
         if (index != null) {
@@ -246,13 +246,13 @@
                 return ks.apply(index).toJsonString();
             };
             KorapResult kr = new KorapResult();
-            kr.setNode(KorapNode.getName());
+            kr.setNode(Node.getName());
             kr.addError(610, "Missing request parameters", "No unique IDs were given");
             return kr.toJsonString();
         };
 
         KorapResponse kresp = new KorapResponse();
-        kresp.setNode(KorapNode.getName());
+        kresp.setNode(Node.getName());
         kresp.setName(index.getName());
         kresp.setVersion(index.getVersion());
         
@@ -276,12 +276,12 @@
                            @Context UriInfo uri) {
 
         // Get index
-        KrillIndex index = KorapNode.getIndex();
+        KrillIndex index = Node.getIndex();
 
         // No index found
         if (index == null) {
             KorapResponse kresp = new KorapResponse();
-            kresp.setNode(KorapNode.getName());
+            kresp.setNode(Node.getName());
             kresp.addError(601, "Unable to find index");
             return kresp.toJsonString();
         };
@@ -289,15 +289,15 @@
         // Get the database
         try {
             MatchCollectorDB mc = new MatchCollectorDB(1000, "Res_" + resultID);
-            Connection conn = KorapNode.getDBPool().getConnection();
-            mc.setDBPool("mysql", KorapNode.getDBPool(), conn);
+            Connection conn = Node.getDBPool().getConnection();
+            mc.setDBPool("mysql", Node.getDBPool(), conn);
             
             // TODO: Only search in self documents (REPLICATION FTW!)
             
             Krill ks = new Krill(json);
             MatchCollector result = index.collect(ks, mc);
 
-            result.setNode(KorapNode.getName());
+            result.setNode(Node.getName());
             return result.toJsonString();
         }
         catch (SQLException e) {
@@ -305,7 +305,7 @@
         };
 
         KorapResponse kresp = new KorapResponse();
-        kresp.setNode(KorapNode.getName());
+        kresp.setNode(Node.getName());
         kresp.setName(index.getName());
         kresp.setVersion(index.getVersion());
 
@@ -334,17 +334,17 @@
     public String search (String json) {
 
 	// Get index
-	KrillIndex index = KorapNode.getIndex();
+	KrillIndex index = Node.getIndex();
 
 	// Search index
         if (index != null) {
             KorapResult kr = new Krill(json).apply(index);
-	    kr.setNode(KorapNode.getName());
+	    kr.setNode(Node.getName());
 	    return kr.toJsonString();
 	};
 
 	KorapResponse kresp = new KorapResponse();
-	kresp.setNode(KorapNode.getName());
+	kresp.setNode(Node.getName());
 	kresp.setName(index.getName());
 	kresp.setVersion(index.getVersion());
 
@@ -359,7 +359,7 @@
 			 @Context UriInfo uri) {
 
 	// Get index
-	KrillIndex index = KorapNode.getIndex();
+	KrillIndex index = Node.getIndex();
 
 	// Search index
         if (index != null) {
@@ -444,7 +444,7 @@
     public String collection (String json) {
 
 	// Get index
-	KrillIndex index = KorapNode.getIndex();
+	KrillIndex index = Node.getIndex();
 
 	if (index == null)
 	    return "{\"documents\" : -1, error\" : \"No index given\" }";
