Moved last clearDevice routines to the destructor of their class