code cleanup of some debug logs;
use auto_ptr instead of shared_ptr to propagate the wrapped obj;
refactored end subscription funcs;