remove shared_from_this from Device::~Device
refactoring