Added smart pointers and stub debug macros