Start to use smart ptrs