Editor code improved