[WIP] plug document interface and clean up missing errors