diff --git a/c_testanalysis.c b/c_testanalysis.c
index bb40f4a..de0d227 100644
--- a/c_testanalysis.c
+++ b/c_testanalysis.c
@@ -5,7 +5,7 @@
 #include "collocatordb.h"
 
 int main() {
-	COLLOCATORS *cdb = open_collocators_for_read("/vol/work/kupietz/Work2/kl/trunk/Analysemethoden/wang2vec/sample");
+	COLLOCATORDB *cdb = open_collocatordb("/vol/work/kupietz/Work2/kl/trunk/Analysemethoden/wang2vec/sample");
   for(int i=100; i < 1000; i++)
     get_collocators(cdb, i);
   printf("%s\n", get_collocators_as_json(cdb, 500));
diff --git a/c_testcdb.c b/c_testcdb.c
index 34f05ec..5a86cc8 100644
--- a/c_testcdb.c
+++ b/c_testcdb.c
@@ -4,10 +4,10 @@
 #include "collocatordb.h"
 
 int main() {
-	COLLOCATORS *cdb = open_collocators("/tmp/test2");
-	inc_collocators(cdb, 2000, 2000, 4);
-	inc_collocators(cdb, 2000, 2001, 4);
-	inc_collocators(cdb, 2000, 2002, 4);
+	COLLOCATORDB *cdb = open_collocatordb_for_write("/tmp/test.rocksdb");
+	inc_collocator(cdb, 2000, 2000, 4);
+	inc_collocator(cdb, 2000, 2001, 4);
+	inc_collocator(cdb, 2000, 2002, 4);
 	dump_collocators(cdb, 2000, 0, 0);
 	return 0;
 }
diff --git a/collocatordb.cc b/collocatordb.cc
index 2f06c63..89da1c6 100644
--- a/collocatordb.cc
+++ b/collocatordb.cc
@@ -197,7 +197,7 @@
     uint64_t freq;
   };
 
-  class Collocators {
+  class CollocatorDB {
   private:
     WriteOptions merge_option_; // for merge
     char _one[sizeof(uint64_t)];
@@ -219,10 +219,10 @@
     void read_vocab(string fname);
     
   public:
-    Collocators(const char *db_name, bool read_only);
-    ~Collocators();
+    CollocatorDB(const char *db_name, bool read_only);
+    ~CollocatorDB();
 
-    // public interface of Collocators.
+    // public interface of CollocatorDB.
     // All four functions return false
     // if the underlying level db operation failed.
 
@@ -323,7 +323,7 @@
     CollocatorIterator* SeekIterator(uint64_t w1, uint64_t w2, int8_t dist);
   };
 
-  rocksdb::Collocators::Collocators(const char *db_name, bool read_only = false) {
+  rocksdb::CollocatorDB::CollocatorDB(const char *db_name, bool read_only = false) {
 		//		merge_option_.sync = true;
     if(read_only)
       db_ = OpenDbForRead(db_name);
@@ -339,15 +339,15 @@
     std::cout << "destroying itera\n";
   }
 
-  rocksdb::Collocators::~Collocators() {
+  rocksdb::CollocatorDB::~CollocatorDB() {
     std::cout << "destroying coll\n";
   }
 
-  void rocksdb::Collocators::inc(const uint32_t w1, const uint32_t w2, const uint8_t dist) {
+  void rocksdb::CollocatorDB::inc(const uint32_t w1, const uint32_t w2, const uint8_t dist) {
     inc(encodeCollocation(w1, w2, dist));
   }
 
-  void rocksdb::Collocators::read_vocab(string fname) {
+  void rocksdb::CollocatorDB::read_vocab(string fname) {
     char strbuf[2048];
     uint64_t freq;
     FILE *fin = fopen(fname.c_str(), "rb");
@@ -365,7 +365,7 @@
     fclose(fin);
   }
 
-  std::shared_ptr<DB> rocksdb::Collocators::OpenDbForRead(const char *name) {
+  std::shared_ptr<DB> rocksdb::CollocatorDB::OpenDbForRead(const char *name) {
 		DB* db;
 		Options options;
     ostringstream dbname, vocabname;
@@ -380,7 +380,7 @@
 		return std::shared_ptr<DB>(db);
   }
 
-  std::shared_ptr<DB> rocksdb::Collocators::OpenDb(const char *dbname) {
+  std::shared_ptr<DB> rocksdb::CollocatorDB::OpenDb(const char *dbname) {
 		DB* db;
 		Options options;
 
@@ -419,7 +419,7 @@
 		return std::shared_ptr<DB>(db);
   }
 
-  CollocatorIterator* rocksdb::Collocators::SeekIterator(uint64_t w1, uint64_t w2, int8_t dist) {
+  CollocatorIterator* rocksdb::CollocatorDB::SeekIterator(uint64_t w1, uint64_t w2, int8_t dist) {
     ReadOptions options;
     options.prefix_same_as_start = true;
     char prefixc[sizeof(uint64_t)];
@@ -431,7 +431,7 @@
     return cit;
   }
 
-	void rocksdb::Collocators::dump(uint32_t w1, uint32_t w2, int8_t dist) {
+	void rocksdb::CollocatorDB::dump(uint32_t w1, uint32_t w2, int8_t dist) {
     auto it = std::unique_ptr<CollocatorIterator>(SeekIterator(w1, w2, dist));
     for (; it->isValid(); it->Next()) {
       uint64_t value = it->intValue();
@@ -486,7 +486,7 @@
 	bool sortByNpmi(const Collocator &lhs, const Collocator &rhs) { return lhs.npmi > rhs.npmi; }
 	bool sortByLfmd(const Collocator &lhs, const Collocator &rhs) { return lhs.lfmd > rhs.lfmd; }
 
-	std::vector<Collocator> rocksdb::Collocators::get_collocators(uint32_t w1) {
+	std::vector<Collocator> rocksdb::CollocatorDB::get_collocators(uint32_t w1) {
 		std::vector<Collocator> collocators;
     uint64_t w2, last_w2 = 0xffffffffffffffff;
     uint64_t sum = 0, total_w1 = 0;
@@ -539,7 +539,7 @@
 
 };
 
-string rocksdb::Collocators::collocators2json(vector<Collocator> collocators) {
+string rocksdb::CollocatorDB::collocators2json(vector<Collocator> collocators) {
   ostringstream s;
   s << "[";
   bool first = true;
@@ -561,18 +561,18 @@
   return s.str();
 }
 
-typedef rocksdb::Collocators COLLOCATORS;
+typedef rocksdb::CollocatorDB COLLOCATORS;
 
 extern "C" {
-	COLLOCATORS *open_collocators(char *dbname) {
-		return new rocksdb::Collocators(dbname);
+	COLLOCATORS *open_collocatordb_for_write(char *dbname) {
+		return new rocksdb::CollocatorDB(dbname, false);
 	}
 	
-	COLLOCATORS *open_collocators_for_read(char *dbname) {
-		return new rocksdb::Collocators(dbname, true);
+	COLLOCATORS *open_collocatordb(char *dbname) {
+		return new rocksdb::CollocatorDB(dbname, true);
 	}
 	
-	void inc_collocators(COLLOCATORS *db, uint32_t w1, uint32_t w2, int8_t dist) {
+	void inc_collocator(COLLOCATORS *db, uint32_t w1, uint32_t w2, int8_t dist) {
 		db->inc(w1, w2, dist);
 	}
 
diff --git a/collocatordb.h b/collocatordb.h
index 406ea5d..fe76e6c 100644
--- a/collocatordb.h
+++ b/collocatordb.h
@@ -25,10 +25,10 @@
     };
     
 		extern "C" {
-			class Collocators {
+			class CollocatorDB {
 			public:
-        Collocators(const char *db_name);
-        ~Collocators();
+        CollocatorDB(const char *db_name);
+        ~CollocatorDB();
         void inc(const uint32_t w1, const uint32_t w2, const uint8_t dist);
         void dump(const uint32_t w1, const uint32_t w2, const uint8_t dist);
         CollocatorIterator* SeekIterator(uint64_t w1, uint64_t w2, int8_t dist);
@@ -37,16 +37,16 @@
 		}
 }
 
-typedef rocksdb::Collocators COLLOCATORS;
+typedef rocksdb::CollocatorDB COLLOCATORDB;
 
 #else
-typedef struct COLLOCATORS COLLOCATORS;
+typedef struct COLLOCATORDB COLLOCATORDB;
 #endif
 
-extern COLLOCATORS *open_collocators(char *s);
-extern COLLOCATORS *open_collocators_for_read(char *s);
-extern void inc_collocators(COLLOCATORS *db, uint64_t w1, uint64_t w2, int8_t dist);
-extern void dump_collocators(COLLOCATORS *db, uint32_t w1, uint32_t w2, int8_t dist);
-extern void get_collocators(COLLOCATORS *db, uint32_t w1);
-extern char *get_collocators_as_json(COLLOCATORS *db, uint32_t w1);
+extern COLLOCATORDB *open_collocatordb(char *s);
+extern COLLOCATORDB *open_collocatordb_for_write(char *s);
+extern void inc_collocator(COLLOCATORDB *db, uint64_t w1, uint64_t w2, int8_t dist);
+extern void dump_collocators(COLLOCATORDB *db, uint32_t w1, uint32_t w2, int8_t dist);
+extern void get_collocators(COLLOCATORDB *db, uint32_t w1);
+extern char *get_collocators_as_json(COLLOCATORDB *db, uint32_t w1);
 
