Added database layer