Reorganization of documents