Updated database and data related functionality