Made use of shared_ptr for container object