Added clone functionality by reseting the queue and reusing share queue codes.
Added comments