Replaced regular pointer with C++11 unique_ptr