Remove duplicate code_editor code in the 3 views