Rewrite Document creation and reflection.