small SharedPtr code cleanups
minor performance tweak to string code