Bugfixes and add methods to class.database.php. undocumented yet.