Add and remove references to editor