moving from shared pointers to ids and adding destructor