Added database and crud functionality