if including document.h, it would also remove a lot of this diff cruft