Updated about half the methods of the DB class to accommodate security fixes