added delete method for Database;
updated closing of Index and wrapper class
added two basic unit tests