Some reorganization and rewriting