Various updates to smart pointer