Add removeDocument fn.