bugfixes and additions for the database class, collections, obj and url