Revert changes concerning the smart pointer

Reverted changes concerning the smart pointer due to ABI inconsistency.