Edit documents and logic