Add tests for DatabaseInterface and DB
Fix DB and DatabaseInterface according to tests