Removed some redundant code from tsmartptr.h.

Removed some redundant code and wrongly defined operators from ```tsmartptr.h```.