Update for new database scheme