Document manipulation and maintenance