More updates to db code.