Added database and tests