Added SmartMutex class