clean code  in mapedit/save