Refactored shared pointers