Access `doc` through accessor method
Rename `stringify` parameter
Change comments