Adjustments for new database structure