code cleanup in unstable.db.library