First working version of editor