Using a unique_ptr here instead of a shared_ptr should slightly reduce the memory footprint