Add database and some tests