Changes db methods so that they are in line with the new db structure