Added some code for the editor