Changed to use move semantics instead of t_transfer.
Reduced redundant codes.