Reorganization and documentation