Cleanup Document.