First draft of a half working editor