Added db class, for database interactions