update codemirror and finalized structure