I've left `$document` as is or perhaps I would need to remove `$dm` also from docblock on line 62