substituted unique_ptr for scoped_ptr, astyle'd