- Update to attaching logic. Use of shared_ptr instead of raw pointers. Potential crash fix.