Added raw pointer to shared pointer conversion function.