diff --git a/src/main/java/de/ids_mannheim/korap/KorapIndex.java b/src/main/java/de/ids_mannheim/korap/KorapIndex.java
index c98b06d..340e527 100644
--- a/src/main/java/de/ids_mannheim/korap/KorapIndex.java
+++ b/src/main/java/de/ids_mannheim/korap/KorapIndex.java
@@ -484,12 +484,9 @@
 	    };
 
 	    long docCount = 0;
-	    // System.err.println("CHECK");
 	    int i = 1;
 	    for (AtomicReaderContext atomic : this.reader().leaves()) {
-		// System.err.println("READER" + i + "a-" + docCount);
 		docCount += collection.bits(atomic).cardinality();
-		// System.err.println("READER" + i + "b-" + docCount);
 		i++;
 	    };
 	    return docCount;
@@ -497,7 +494,6 @@
     
 	// Create search term
 	Term term = new Term(field, "-:" + type);
-	// System.err.println(">> Search for -:" + type + " in " + field);
 
 	long occurrences = 0;
 	try {
diff --git a/src/main/java/de/ids_mannheim/korap/index/collector/MatchCollectorDB.java b/src/main/java/de/ids_mannheim/korap/index/collector/MatchCollectorDB.java
index 62bc4c7..10650dd 100644
--- a/src/main/java/de/ids_mannheim/korap/index/collector/MatchCollectorDB.java
+++ b/src/main/java/de/ids_mannheim/korap/index/collector/MatchCollectorDB.java
@@ -18,15 +18,15 @@
     private final static Logger log = LoggerFactory.getLogger(KorapNode.class);
 
     /*
-      Todo: In case there are multiple threads searching,
-      the list should be synchrinized Collections.synchronizedList()
+     * Todo: In case there are multiple threads searching,
+     * the list should be synchrinized Collections.synchronizedList()
      */
     private String databaseType;
     private List matchCollector;
     private int bufferSize, docCollect;
     private String resultID;
 
-    //    private Connection connection;
+    // private Connection connection;
     private DataSource pool;
     private Connection connection;
     private PreparedStatement prepared;
@@ -64,22 +64,27 @@
     };
 
     @JsonIgnore
+    public void setDBPool (String type, DataSource ds, Connection conn) throws SQLException {
+	this.setDatabaseType(type);
+	this.connection = conn;
+	this.pool = ds;
+    };
+
+
+    @JsonIgnore
     public void setDBPool (String type, DataSource ds) throws SQLException {
 	this.setDatabaseType(type);
 	this.pool = ds;
-
-	// Create prepared statement for multiple requests
-
-	/*
-	this.prepared = this.conn.prepareStatement(
-	  "INSERT INTO people VALUES (?, ?);"
-        );
-
-	Only prepare if commit > buffersize!
-Difference between mariadb and sqlite!
-	*/
-
     };
+    /*
+      Create prepared statement for multiple requests
+      this.prepared = this.conn.prepareStatement(
+      "INSERT INTO people VALUES (?, ?);"
+      );
+      Only prepare if commit > buffersize!
+      Difference between mariadb and sqlite!
+    */
+
     
     /* TODO: Ensure the commit was successful! */
     public void commit () {	
@@ -87,23 +92,20 @@
 	    return;
 
 	try {
-	    // This should be heavily optimized! It's aweful!
 	    /*
+	     * This should be heavily optimized! It's aweful!
 	     * ARGHHHHHHH!
 	     */
 
-	    if (this.connection == null)
+	    if (this.connection.isClosed())
 		this.connection = this.pool.getConnection();
 
-	    // TODO: Create a BEGIN ... COMMIT Transaction
-	    // connection.setAutoCommit(true);
-
 	    StringBuilder sb = new StringBuilder();
-	    sb.append("INSERT INTO ");
-	    sb.append(this.resultID);
-	    sb.append(" (text_id, match_count) ");
+	    sb.append("INSERT INTO ")
+		.append(this.resultID)
+		.append(" (text_id, match_count) ");
 
-	    // SQLite insertion idiom
+	    // SQLite batch insertion idiom
 	    if (this.getDatabaseType().equals("sqlite")) {
 		for (int i = 1; i < this.docCollect; i++) {
 		    sb.append("SELECT ?, ? UNION ");
@@ -114,7 +116,7 @@
 		    sb.append("SELECT ?, ?");
 	    }
 
-	    // MySQL insertion idiom
+	    // MySQL batch insertion idiom
 	    else if (this.getDatabaseType().equals("mysql")) {
 		sb.append(" VALUES ");
 		for (int i = 1; i < this.docCollect; i++) {
@@ -122,52 +124,59 @@
 		};
 		sb.append("(?,?)");
 	    }
+
+	    // Unknown idiom
 	    else {
 		log.error("Unsupported Database type");
 		return;
 	    };
 
-	    // System.err.println(sb.toString());
-
-	    PreparedStatement prep = connection.prepareStatement(sb.toString());
+	    // Prepare statement based on the string
+	    PreparedStatement prep = this.connection.prepareStatement(sb.toString());
 
 	    int i = 1;
 	    ListIterator li = this.matchCollector.listIterator(); 
 	    while (li.hasNext()) {
 		int[] v = (int[]) li.next();
-		// System.err.println("Has " + i + ":" + v[0]);
 		prep.setInt(i++, v[0]);
-		// System.err.println("Has " + i + ":" + v[1]);
 		prep.setInt(i++, v[1]);
-		// System.err.println("-");
 	    };
 
-	    // System.err.println(sb.toString());
-
 	    prep.addBatch();
 	    prep.executeBatch();
-	    // connection.setAutoCommit(false);
-	    //	    connection.close();
-	    this.matchCollector.clear();
-	    this.docCollect = 0;
+	    this.connection.commit();
 	}
+
+	// An SQL error occured ...
 	catch (SQLException e) {
-	    this.matchCollector.clear();
-	    this.docCollect = 0;
-	    System.err.println("Error: " + e.getLocalizedMessage());
 	    log.error(e.getLocalizedMessage());
 	};
+
+	this.matchCollector.clear();
+	this.docCollect = 0;
 	return;
     };
 
+    /*
+     * Close collector and connection
+     */
     public void close () {
 	this.commit();
-	/*
 	try {
 	    this.connection.close();
 	}
-	catch (SQLException e) {
-	};
-	*/
+       	catch (SQLException e) {
+	    log.warn(e.getLocalizedMessage());
+	}
+    };
+
+    /*
+     * Close collector and probably connection
+     */
+    public void close (boolean close) {
+	if (close)
+	    this.close();
+	else
+	    this.commit();
     };
 };
diff --git a/src/main/java/de/ids_mannheim/korap/server/KorapResponse.java b/src/main/java/de/ids_mannheim/korap/server/KorapResponse.java
index 6e2d967..dbcbdd7 100644
--- a/src/main/java/de/ids_mannheim/korap/server/KorapResponse.java
+++ b/src/main/java/de/ids_mannheim/korap/server/KorapResponse.java
@@ -23,6 +23,7 @@
     private String errstr, msg, version, node, listener;
     private int err, unstaged;
     private int totalResults;
+    private long totalTexts;
     private String benchmark;
 
     public KorapResponse (String node, String version) {
@@ -100,6 +101,17 @@
 	return this;
     };
 
+    public KorapResponse setTotalTexts (long i) {
+        this.totalTexts = i;
+	return this;
+    };
+
+    public long getTotalTexts() {
+        return this.totalTexts;
+    };
+
+
+
     public KorapResponse setTotalResults (int i) {
         this.totalResults = i;
 	return this;
diff --git a/src/main/java/de/ids_mannheim/korap/server/Resource.java b/src/main/java/de/ids_mannheim/korap/server/Resource.java
index ba8d3e9..97d6973 100644
--- a/src/main/java/de/ids_mannheim/korap/server/Resource.java
+++ b/src/main/java/de/ids_mannheim/korap/server/Resource.java
@@ -42,6 +42,7 @@
 import org.slf4j.LoggerFactory;
 
 import java.sql.SQLException;
+import java.sql.Connection;
 
 /*
   http://www.vogella.com/tutorials/REST/article.html
@@ -76,13 +77,22 @@
     };
 
     @GET
-    @Path("/info")
     @Produces(MediaType.APPLICATION_JSON)
     public String info () {
 	KorapIndex index = KorapNode.getIndex();
 	KorapResponse kresp = new KorapResponse(KorapNode.getName(), index.getVersion());
 	kresp.setListener(KorapNode.getListener());
-	return kresp.setMsg("Up and running!").toJSON();
+	long texts = -1;
+	try {
+	    texts = index.numberOf("documents");
+	}
+	catch (IOException e) {
+	    log.error(e.getLocalizedMessage());
+	};
+
+	return kresp.setTotalTexts(texts)
+	    .setMsg("Up and running!")
+	    .toJSON();
     };
     
 
@@ -247,7 +257,8 @@
 	// Get the database
 	try {
 	    MatchCollectorDB mc = new MatchCollectorDB(1000, "Res_" + resultID);
-	    mc.setDBPool("mysql", KorapNode.getDBPool());
+	    Connection conn = KorapNode.getDBPool().getConnection();
+	    mc.setDBPool("mysql", KorapNode.getDBPool(), conn);
 
 	    // TODO: Only search in self documents (REPLICATION FTW!)
 
diff --git a/src/main/resources/index.properties b/src/main/resources/index.properties
index fa1fd47..f1d4d58 100644
--- a/src/main/resources/index.properties
+++ b/src/main/resources/index.properties
@@ -1 +1,3 @@
 lucene.index.version = ${project.version}
+lucene.index.commit.count = 134217000
+lucene.index.commit.log = log/korap.commit.log
diff --git a/src/main/resources/log4j.properties b/src/main/resources/log4j.properties
index 7c2b69a..48c48d1 100644
--- a/src/main/resources/log4j.properties
+++ b/src/main/resources/log4j.properties
@@ -1,6 +1,6 @@
 ## logger file can be used with
 
-#log4j.rootLogger = DEBUG, stdout
+log4j.rootLogger = ERROR, stdout
 
 # Spans:
 #log4j.logger.de.ids_mannheim.korap.query.spans.ElementSpans = TRACE, stdout
diff --git a/src/main/resources/server.properties.info b/src/main/resources/server.properties.info
new file mode 100644
index 0000000..2a392e8
--- /dev/null
+++ b/src/main/resources/server.properties.info
@@ -0,0 +1,11 @@
+# Lucene Backend properties
+lucene.properties   = true
+lucene.indexDir     = [PATH TO INDEX DIRECTORY]
+lucene.node.name    = [UNIQUE NODE NAME]
+lucene.node.baseURI = [LISTEN-URL INCLUDING PORT]
+
+# Lucene Database properties
+lucene.db.class     = org.mariadb.jdbc.Driver 
+lucene.db.URL       = jdbc:mysql://[DB_IP]:[DB_PORT]/[DB_NAME]
+lucene.db.pwd       = [DB_PWD]
+lucene.db.user      = [DB_USER]
diff --git a/src/test/java/de/ids_mannheim/korap/server/TestDatabase.java b/src/test/java/de/ids_mannheim/korap/server/TestDatabase.java
index ec06631..009e50e 100644
--- a/src/test/java/de/ids_mannheim/korap/server/TestDatabase.java
+++ b/src/test/java/de/ids_mannheim/korap/server/TestDatabase.java
@@ -16,7 +16,7 @@
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.Ignore;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
 
 public class TestDatabase {
 
@@ -69,16 +69,17 @@
      * temporary dbs - should be improved
      */
 
-    @Ignore
+    @Test
     public void TestDatabasePool () throws Exception {
 	ComboPooledDataSource cpds = new ComboPooledDataSource();
 	// Connect to a temporary file instead of a in-memory file
 	cpds.setDriverClass("org.sqlite.JDBC");
-	cpds.setJdbcUrl("jdbc:sqlite:hui");
+	cpds.setJdbcUrl("jdbc:sqlite:");
 	cpds.setMaxStatements(100);
 
 	// This is part of the match collector
 	this.conn = cpds.getConnection();
+	conn.setAutoCommit(false);
 	this.stat = conn.createStatement();
 	stat.executeUpdate(
             "CREATE TABLE IF NOT EXISTS result_a (text_id INTEGER, match_count INTEGER);"
@@ -93,49 +94,57 @@
 	prep.executeBatch();
 
 	ResultSet rs = stat.executeQuery("SELECT * FROM result_a;");
-
 	rs.next();
-	
 	assertEquals(rs.getInt("text_id"), 5);
 	assertEquals(rs.getInt("match_count"), 8000);
-
 	rs.close();
 
-	// this.conn.close();
-
 	MatchCollectorDB mc = new MatchCollectorDB(2000, "result_a");
-	mc.setDBPool("sqlite", cpds);
+	mc.setDBPool("sqlite", cpds, this.conn);
 
 	mc.add(9, 5000);
 	mc.add(12, 6785);
 	mc.add(39, 56576);
 
-	mc.close();
+	mc.close(false);
 
-	/*
-	this.stat = this.conn.createStatement();
-	stat.executeUpdate("CREATE TABLE IF NOT EXISTS result_a (text_id INTEGER, match_count INTEGER);");
-	*/
+	rs = stat.executeQuery("SELECT * FROM result_a;");
+	assertTrue(rs.next());
+	assertEquals(rs.getInt("text_id"), 5);
+	assertEquals(rs.getInt("match_count"), 8000);
+	rs.next();
+	assertEquals(rs.getInt("text_id"), 9);
+	assertEquals(rs.getInt("match_count"), 5000);
+	rs.next();
+	assertEquals(rs.getInt("text_id"), 12);
+	assertEquals(rs.getInt("match_count"), 6785);
+	rs.next();
+	assertEquals(rs.getInt("text_id"), 39);
+	assertEquals(rs.getInt("match_count"), 56576);
+	
+	rs.close();
     };
 
-    @Ignore
-    public void TestDatabasePoolConnector () throws Exception {
+    @Test
+    public void TestDatabasePoolCollector () throws Exception {
 	ComboPooledDataSource cpds = new ComboPooledDataSource();
 	// Connect to a temporary file instead of a in-memory file
 	cpds.setDriverClass("org.sqlite.JDBC");
-	cpds.setJdbcUrl("jdbc:sqlite:hui");
+	cpds.setJdbcUrl("jdbc:sqlite:");
 	cpds.setMaxStatements(100);
 
 	// This is part of the match collector
 	conn = cpds.getConnection();
-	stat = conn.createStatement();
-	// conn.setAutoCommit(true);
+	conn.setAutoCommit(false);
+	Statement stat = conn.createStatement();
 	stat.executeUpdate(
-            "CREATE TABLE matchXYZ (text_id INTEGER, match_count INTEGER);"
+            "CREATE TABLE IF NOT EXISTS matchXYZ (text_id INTEGER, match_count INTEGER);"
 	);
+	conn.commit();
+	stat.close();
 
 	MatchCollectorDB mc = new MatchCollectorDB(3, "matchXYZ");
-	mc.setDBPool("sqlite", cpds);
+	mc.setDBPool("sqlite", cpds, conn);
 
 	mc.add(9, 5000);
 	mc.add(12, 6785);
@@ -148,14 +157,41 @@
 	// Second commit
 
 	mc.add(94, 456);
-	mc.close();
+	mc.close(false);
 	// Final commit
 
 	// conn = cpds.getConnection();
 	stat = conn.createStatement();
 	ResultSet rs = stat.executeQuery("SELECT count('*') AS num FROM matchXYZ;");
-	rs.next();
+
 	assertEquals(7, rs.getInt("num"));
+
+	rs = stat.executeQuery("SELECT text_id, match_count FROM matchXYZ;");
+	assertTrue(rs.next());
+
+	assertEquals(rs.getInt("text_id"), 9);
+	assertEquals(rs.getInt("match_count"), 5000);
+	assertTrue(rs.next());
+	assertEquals(rs.getInt("text_id"), 12);
+	assertEquals(rs.getInt("match_count"), 6785);
+	assertTrue(rs.next());
+	assertEquals(rs.getInt("text_id"), 39);
+	assertEquals(rs.getInt("match_count"), 56576);
+	assertTrue(rs.next());
+	assertEquals(rs.getInt("text_id"), 45);
+	assertEquals(rs.getInt("match_count"), 5000);
+	assertTrue(rs.next());
+	assertEquals(rs.getInt("text_id"), 67);
+	assertEquals(rs.getInt("match_count"), 6785);
+	assertTrue(rs.next());
+	assertEquals(rs.getInt("text_id"), 81);
+	assertEquals(rs.getInt("match_count"), 56576);
+	assertTrue(rs.next());
+	assertEquals(rs.getInt("text_id"), 94);
+	assertEquals(rs.getInt("match_count"), 456);
+	assertFalse(rs.next());
+
+	stat.close();
     };
 
     @Test
