Replaced scoped_ptr by unique_ptr