Updated database class.