[IMP] Unified database class & migrated to API v8