Adding support for smart pointers