It feels a bit weird (and verbose) that we use the shared pointer even here.