simplify/cleanup recent SharedPtr<> template code