Revert "Implemented smart pointer logic"

This reverts commit f72745da4b3550ee7787d53a2fe848ccf4b1ab68.