Migrated more files to use the new db API.