clean up and modification on mapeditor(still in prograss)