Using shared ptr for particles.