Add close and destructor.