MainEditor refactoring
- enhancement save function
- enhancement save dialog