simplified and added a codemirror editor