Added a class destructor that sets the database connection to null