Updated Database functionality