This is now the second time I do this, the other time being in AutoRouteMaker. Should we implement this in DocumentManager?