#65 More cleaning with shared_ptr